runs matoya tests in CI (several were broken, because nobody ever runs them) #13
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: Tests | |
on: | |
pull_request: | |
types: [ labeled, synchronize ] | |
jobs: | |
label: | |
name: Find 'Test Matoya' Label | |
runs-on: ubuntu-latest | |
outputs: | |
label_exists: ${{contains(toJson(github.event.label.name), 'Test Matoya') || ( (github.event.action == 'synchronize') && contains(toJson(github.event.pull_request.labels.*.name), 'Test Matoya') )}} | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Nothing | |
shell: bash | |
run: echo "" | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
needs: label | |
if: ${{needs.label.outputs.label_exists == 'true'}} | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
TERM: xterm-256color | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
with: | |
path: libmatoya | |
- name: Test | |
run: | | |
cd libmatoya | |
make ARCH=arm64 | |
cd test | |
make ARCH=arm64 | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
needs: label | |
if: ${{needs.label.outputs.label_exists == 'true'}} | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
TERM: xterm-256color | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
with: | |
path: libmatoya | |
- name: Test | |
run: | | |
cd libmatoya | |
make | |
cd test | |
make | |
windows: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
needs: label | |
if: ${{needs.label.outputs.label_exists == 'true'}} | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { name: "Windows x64", os: windows-2022, bits: 64 } | |
env: | |
VCVARS_PATH: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
with: | |
path: libmatoya | |
- name: Test | |
shell: cmd | |
run: | | |
call "%VCVARS_PATH%/vcvars${{ matrix.config.bits }}.bat" | |
cd libmatoya | |
nmake | |
cd test | |
nmake |