setup-zig/.github/workflows/ci.yml

53 lines
2.0 KiB
YAML
Raw Normal View History

2019-10-05 10:54:14 +00:00
name: CI
2019-10-05 10:56:30 +00:00
on: push
2019-10-05 10:54:14 +00:00
jobs:
test:
name: Unit tests
2019-10-05 13:19:06 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
2019-10-05 13:19:06 +00:00
2019-10-05 10:54:14 +00:00
smoke-test:
name: Build test
2019-10-05 10:58:19 +00:00
strategy:
fail-fast: false
2019-10-05 10:58:19 +00:00
matrix:
os: [ubuntu-latest, macos-12, macos-latest, windows-latest]
zig-version: [0.11.0, 0.12.0]
test-variant: [modern]
2022-11-07 12:42:28 +00:00
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 }
2019-10-05 11:01:01 +00:00
runs-on: ${{matrix.os}}
2019-10-05 10:54:14 +00:00
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Zig
uses: goto-bus-stop/setup-zig@default
2019-10-05 10:57:26 +00:00
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