setup-zig/.github/workflows/ci.yml
Renée 2a9625d550
Update CI version matrix (#77)
* ci: tweak versions matrix

* tweak ifs

* ci: different way to use legacy versions

* clearer test variant name

* fixup! clearer test variant name

* syntax?
2024-04-26 10:05:48 +02:00

53 lines
2.0 KiB
YAML

name: CI
on: push
jobs:
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
smoke-test:
name: Build test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, macos-latest, windows-latest]
zig-version: [0.11.0, 0.12.0]
test-variant: [modern]
include:
- { os: ubuntu-latest, zig-version: 0.5.0, test-variant: legacy }
- { os: ubuntu-latest, zig-version: 0.7.0, test-variant: legacy }
- { os: ubuntu-latest, zig-version: 0.8.0, test-variant: legacy }
- { os: ubuntu-latest, zig-version: 0.9.0, test-variant: legacy }
- { os: ubuntu-latest, zig-version: 0.10.0, test-variant: legacy }
- { os: macos-12, zig-version: 0.7.0, test-variant: legacy }
- { os: macos-12, zig-version: 0.8.0, test-variant: legacy }
- { os: macos-12, zig-version: 0.9.0, test-variant: legacy }
- { os: macos-12, zig-version: 0.10.0, test-variant: legacy }
- { os: windows-latest, zig-version: 0.7.0, test-variant: legacy }
- { os: windows-latest, zig-version: 0.8.0, test-variant: legacy }
- { os: windows-latest, zig-version: 0.9.0, test-variant: legacy }
- { os: windows-latest, zig-version: 0.10.0, test-variant: legacy }
runs-on: ${{matrix.os}}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Zig
uses: goto-bus-stop/setup-zig@default
with:
version: ${{matrix.zig-version}}
- name: Run tests (zig up to v0.10.x)
if: ${{ matrix.test-variant == 'legacy' }}
run: zig build test
working-directory: test/v0.10
- name: Run tests (zig v0.11.x)
if: ${{ matrix.test-variant == 'modern' }}
run: zig build test
working-directory: test/v0.11