2023-04-29 16:22:52 +02:00
|
|
|
name: CI
|
2023-04-26 19:40:16 +02:00
|
|
|
|
2023-04-12 17:04:18 +02:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2023-04-26 19:40:16 +02:00
|
|
|
workflow_dispatch:
|
2023-04-12 17:04:18 +02: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 19:40:16 +02:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-04-12 17:04:18 +02:00
|
|
|
|
2023-04-26 19:40:16 +02:00
|
|
|
- name: Setup Zig
|
|
|
|
uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.zig }}
|
2023-04-12 17:04:18 +02:00
|
|
|
|
2023-04-26 19:40:16 +02:00
|
|
|
- name: Check compatibility with old Zig compilers
|
|
|
|
run: ci/compat.sh
|
2023-04-29 16:22:52 +02:00
|
|
|
|
|
|
|
test:
|
2023-04-28 13:03:24 +02:00
|
|
|
name: Unit Tests
|
2023-04-25 15:25:07 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-29 16:22:52 +02:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-04-25 15:25:07 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-04-26 19:40:16 +02:00
|
|
|
timeout-minutes: 30
|
2023-04-25 15:25:07 +02:00
|
|
|
steps:
|
2023-04-26 19:40:16 +02:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-04-25 15:25:07 +02:00
|
|
|
|
2023-04-26 19:40:16 +02:00
|
|
|
- name: Setup Zig
|
|
|
|
uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
|
|
|
version: master
|
2023-04-25 15:25:07 +02:00
|
|
|
|
2023-04-26 19:40:16 +02:00
|
|
|
- name: Run unit tests
|
|
|
|
run: zig build test
|