-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from 1138-4EB/feat-shelltype
Add GHA workflow, allow to select shell variant, add checks, etc.
- Loading branch information
Showing
9 changed files
with
177 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'action' | ||
on: [ push, pull_request ] | ||
jobs: | ||
set: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install deps | ||
run: npm ci | ||
- name: run action | ||
uses: ./ | ||
- name: test MSYS | ||
run: | | ||
set MSYSTEM=MSYS | ||
msys2do ./test.sh | ||
- name: test MINGW64 | ||
run: | | ||
set MSYSTEM=MINGW64 | ||
msys2do ./test.sh | ||
- name: test MINGW32 | ||
run: | | ||
set MSYSTEM=MINGW32 | ||
msys2do ./test.sh | ||
undef: | ||
strategy: | ||
matrix: | ||
task: [ MSYS, MINGW64, MINGW32 ] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install deps | ||
run: npm ci | ||
- name: run action | ||
uses: ./ | ||
with: | ||
msystem: ${{ matrix.task }} | ||
- run: msys2do ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# comment this out distribution branches | ||
node_modules/ | ||
|
||
# Editors | ||
.vscode | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Other Dependency directories | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
# Setup msys2 | ||
# Setup MSYS2 | ||
|
||
This is a GitHub action to setup an msys2 environment | ||
**setup-msys2** is a JavaScript GitHub Action (GHA) to setup a full-featured [MSYS2](https://www.msys2.org/) environment, using the GHA [toolkit](https://github.com/actions/toolkit). | ||
|
||
In actions.yml: | ||
The latest tarball available at [repo.msys2.org/distrib/x86_64](http://repo.msys2.org/distrib/x86_64/) is cached. Using the action extracts it and provides an entrypoint named `msys2do`. | ||
|
||
``` | ||
steps: | ||
## Usage | ||
|
||
```yaml | ||
- uses: numworks/setup-msys2@v1 | ||
- run: msys2do uname -a | ||
``` | ||
By default, `MSYSTEM` is set to `MINGW64`. However, an optional parameter named `msystem` is supported, which expects `MSYS`, `MINGW64` or `MING32`. For example: | ||
|
||
```yaml | ||
- uses: numworks/setup-msys2@v1 | ||
with: | ||
msystem: MSYS | ||
``` | ||
|
||
Furthermore, the environment variable can be overriden. This is useful when multiple commands need to be executed in different contexts. For example, in order to build a PKGBUILD file and then test the installed artifact: | ||
|
||
```yaml | ||
- uses: numworks/setup-msys2@v1 | ||
with: | ||
msystem: MSYS | ||
- run: msys2do makepkg-mingw -sCLfc --noconfirm --noprogressbar | ||
- run: msys2do pacman --noconfirm -U mingw-w64-*-any.pkg.tar.xz | ||
- run: | | ||
set MSYSTEM=MINGW64 | ||
msys2do <command to test the package> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
name: 'Setup Msys2 environment' | ||
description: 'Setup an Msys2 environment and provide an msys2do helper' | ||
author: 'NumWorks' | ||
inputs: | ||
msystem: | ||
description: 'Variant of the environment to set by default: MSYS, MINGW32 or MINGW64' | ||
required: false | ||
default: 'MINGW64' | ||
runs: | ||
using: 'node12' | ||
main: 'index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
uname -a | ||
|
||
env | grep MSYS |