-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (36 loc) · 1004 Bytes
/
ci.yml
File metadata and controls
45 lines (36 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CI
on:
push:
branches: [main]
pull_request:
branches: ["**"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ci
cancel-in-progress: true
env:
ZIG_VERSION: 0.16.0
jobs:
build-test:
name: build & test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
cache-key: ${{ matrix.os }}-${{ env.ZIG_VERSION }}
# Zig fmt is failing on windows and is redundant to run all platforms. So we run only on linux.
- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: zig fmt --check .
- name: zig build (Release Safe)
run: zig build --release=safe
- name: Test
run: zig build test