2023-04-29 15:22:52 +01:00
|
|
|
name: CI
|
2023-04-26 18:40:16 +01:00
|
|
|
|
2023-04-12 16:04:18 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2023-04-26 18:40:16 +01:00
|
|
|
workflow_dispatch:
|
2023-04-12 16:04:18 +01:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compat:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
zig: [ 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0 ]
|
|
|
|
steps:
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-04-12 16:04:18 +01:00
|
|
|
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Setup Zig
|
|
|
|
uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.zig }}
|
2023-04-12 16:04:18 +01:00
|
|
|
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Check compatibility with old Zig compilers
|
|
|
|
run: ci/compat.sh
|
2023-04-29 15:22:52 +01:00
|
|
|
|
|
|
|
test:
|
2023-04-28 12:03:24 +01:00
|
|
|
name: Unit Tests
|
2023-04-25 14:25:07 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-29 15:22:52 +01:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-04-25 14:25:07 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-04-26 18:40:16 +01:00
|
|
|
timeout-minutes: 30
|
2023-04-25 14:25:07 +01:00
|
|
|
steps:
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-04-25 14:25:07 +01:00
|
|
|
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Setup Zig
|
|
|
|
uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
|
|
|
version: master
|
2023-04-25 14:25:07 +01:00
|
|
|
|
2023-04-26 18:40:16 +01:00
|
|
|
- name: Run unit tests
|
|
|
|
run: zig build test
|