Test #1174
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
name: Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 3,6' | |
jobs: | |
checks: | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- run: | | |
npm ci | |
npm run lint | |
npm run tsc | |
cache: | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π§ build action | |
shell: bash | |
run: | | |
npm ci | |
npm run pkg | |
rm -rf node_modules | |
- name: π€ Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: action | |
path: dist | |
- name: π§ run action | |
uses: ./dist | |
with: | |
update: true | |
install: base-devel git | |
- shell: msys2 {0} | |
name: π¦ test | |
run: | | |
uname -a | |
powershell: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- name: πͺ test MSYS | |
run: | | |
$env:MSYSTEM = 'MSYS' | |
msys2 ./test.sh MSYS | |
- name: π¦ test MINGW64 | |
run: | | |
$env:MSYSTEM = 'MINGW64' | |
msys2 ./test.sh MINGW64 | |
- name: β¬ test MINGW32 | |
run: | | |
$env:MSYSTEM = 'MINGW32' | |
msys2 ./test.sh MINGW32 | |
- name: π¨ test UCRT64 | |
run: | | |
$env:MSYSTEM = 'UCRT64' | |
msys2 ./test.sh UCRT64 | |
- name: π« test CLANG32 | |
run: | | |
$env:MSYSTEM = 'CLANG32' | |
msys2 ./test.sh CLANG32 | |
- name: π§ test CLANG64 | |
run: | | |
$env:MSYSTEM = 'CLANG64' | |
msys2 ./test.sh CLANG64 | |
cmd: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- name: πͺ test MSYS | |
shell: cmd | |
run: | | |
set MSYSTEM=MSYS | |
msys2 ./test.sh MSYS | |
- name: π¦ test MINGW64 | |
shell: cmd | |
run: | | |
set MSYSTEM=MINGW64 | |
msys2 ./test.sh MINGW64 | |
- name: β¬ test MINGW32 | |
shell: cmd | |
run: | | |
set MSYSTEM=MINGW32 | |
msys2 ./test.sh MINGW32 | |
- name: π¨ test UCRT64 | |
shell: cmd | |
run: | | |
set MSYSTEM=UCRT64 | |
msys2 ./test.sh UCRT64 | |
- name: π« test CLANG32 | |
shell: cmd | |
run: | | |
set MSYSTEM=CLANG32 | |
msys2 ./test.sh CLANG32 | |
- name: π§ test CLANG64 | |
shell: cmd | |
run: | | |
set MSYSTEM=CLANG64 | |
msys2 ./test.sh CLANG64 | |
env: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- name: πͺ test MSYS | |
run: msys2 ./test.sh MSYS | |
env: | |
MSYSTEM: MSYS | |
- name: π¦ test MINGW64 | |
run: msys2 ./test.sh MINGW64 | |
env: | |
MSYSTEM: MINGW64 | |
- name: β¬ test MINGW32 | |
run: msys2 ./test.sh MINGW32 | |
env: | |
MSYSTEM: MINGW32 | |
- name: π¨ test UCRT64 | |
run: msys2 ./test.sh UCRT64 | |
env: | |
MSYSTEM: UCRT64 | |
- name: π« test CLANG32 | |
run: msys2 ./test.sh CLANG32 | |
env: | |
MSYSTEM: CLANG32 | |
- name: π§ test CLANG64 | |
run: msys2 ./test.sh CLANG64 | |
env: | |
MSYSTEM: CLANG64 | |
shell: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- shell: msys2 {0} | |
run: | | |
uname -a | |
MSYS2_PATH_TYPE: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- run: msys2 -c "go env" | |
env: | |
MSYS2_PATH_TYPE: inherit | |
path-type: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
path-type: inherit | |
- run: msys2 -c "go env" | |
install: | |
name: π¦ mingw64 | install ${{ matrix.install }} | |
needs: [cache] | |
strategy: | |
fail-fast: false | |
matrix: | |
install: [ false, git, 'base-devel git' ] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
update: true | |
install: ${{ matrix.install }} | |
msystem: mingw64 | |
- run: msys2 ./test.sh mingw64 | |
defaultclean: | |
needs: [cache] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- run: git config --global core.autocrlf input | |
shell: bash | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
update: true | |
install: base-devel git | |
- run: git describe --dirty --tags | |
defaultdirty: | |
needs: [cache] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
update: true | |
install: base-devel git | |
- run: git describe --dirty --tags | |
errorhandling: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- shell: msys2 {0} | |
run: | | |
(! false | true) || exit 1; # make sure "-o pipefail" is active by default | |
[[ "$-" =~ 'e' ]] || exit 1; # make sure "set -e" is active by default | |
workingdir: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
- shell: msys2 {0} | |
run: | | |
# make sure we are in checkout directory | |
dir="$(pwd)" | |
cd "$GITHUB_WORKSPACE" | |
[[ "$dir" == "$(pwd)" ]] | |
norelease: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
release: false | |
update: false | |
install: ccache | |
- shell: msys2 {0} | |
run: | | |
uname -a | |
nocache: | |
needs: [cache] | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
release: true | |
update: true | |
cache: false | |
- shell: msys2 {0} | |
run: | | |
uname -a | |
platformchecks: | |
name: ${{ matrix.icon }} ${{ matrix.platform }} | platformchecks | |
needs: [cache] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { platform: macos, icon: 'π§' } | |
- { platform: ubuntu, icon: 'π' } | |
runs-on: ${{ matrix.platform }}-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
platform-check-severity: warn | |
location: | |
name: location | ${{ matrix.location }} | |
needs: [cache] | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
location: | |
- D:\ | |
- D:\some\arbitrary | |
- RUNNER_TEMP | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
id: msys2 | |
with: | |
location: ${{ matrix.location }} | |
update: false | |
- shell: msys2 {0} | |
run: | | |
cygpath -m / | |
- shell: pwsh | |
env: | |
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
run: | | |
echo "$env:MSYS2_LOCATION" | |
- shell: pwsh | |
env: | |
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
run: | | |
$Env:MSYS2_ROOT = msys2 -c 'cygpath -a -w /' | |
$Env:MSYS2_ROOT | |
if ($env:MSYS2_ROOT -ne "$env:MSYS2_LOCATION") { | |
Write-Error "Error: MSYS2_ROOT is '$env:MSYS2_ROOT', expected '$env:MSYS2_LOCATION'" | |
exit 1 | |
} | |
- shell: python | |
run: | | |
from subprocess import check_output | |
MSYS2_ROOT = check_output(['msys2', '-c', 'cygpath -a -w /'], shell=True).decode('utf-8') | |
print(MSYS2_ROOT) | |
matrix: | |
needs: cache | |
name: β¬ Generate lists of jobs | |
runs-on: ubuntu-latest | |
outputs: | |
jobs: ${{ steps.all.outputs.jobs }} | |
min: ${{ steps.min.outputs.jobs }} | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- id: all | |
uses: ./matrix | |
- id: min | |
uses: ./matrix | |
with: | |
systems: 'mingw32 mingw64 ucrt64 clang64' | |
msystem: | |
name: ${{ matrix.icon }} ${{ matrix.sys }} | msystem | |
needs: matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.matrix.outputs.jobs) }} | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
msystem: ${{ matrix.sys }} | |
- run: msys2 ./test.sh ${{ matrix.sys }} | |
update: | |
name: ${{ matrix.icon }} ${{ matrix.sys }} | update | |
needs: matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.matrix.outputs.jobs) }} | |
runs-on: windows-latest | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
update: true | |
msystem: ${{ matrix.sys }} | |
- run: msys2 ./test.sh ${{ matrix.sys }} | |
install-and-pacboy: | |
name: ${{ matrix.icon }} ${{ matrix.sys }} | install-and-pacboy | |
needs: matrix | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.matrix.outputs.min) }} | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
install: git | |
pacboy: openssl:p | |
- shell: msys2 {0} | |
run: | | |
uname -a | |
openssl help | |
pacboy: | |
name: ${{ matrix.icon }} ${{ matrix.sys }} | pacboy | |
needs: matrix | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.matrix.outputs.min) }} | |
steps: | |
- name: π§° Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: π₯ Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: π§ run action | |
uses: ./ | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
pacboy: openssl:p | |
- shell: msys2 {0} | |
run: | | |
uname -a | |
openssl help |