Repository navigation
77 lines (71 loc) · 1.94 KB
/
Copy pathci.yml
File metadata and controls
77 lines (71 loc) · 1.94 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: ci
on:
push:
branches: [main]
pull_request:
# mlugg/setup-zig still declares node20, which GitHub runners are
# deprecating; force Node 24 ahead of the switchover.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
fmt:
name: zig fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- run: zig fmt --check build.zig build.zig.zon src test
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- name: Fetch dependencies (with retry)
run: |
for i in 1 2 3 4 5; do
zig build --fetch=all && exit 0
echo "fetch attempt $i failed; retrying in 10s" >&2
sleep 10
done
exit 1
- name: Build
run: zig build --summary all
- name: Unit tests
run: zig build test --summary all
- name: Integration tests (real PTY)
run: zig build test-integration --summary all
release-safe:
name: test ReleaseSafe
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- name: Fetch dependencies (with retry)
run: |
for i in 1 2 3 4 5; do
zig build --fetch=all && exit 0
echo "fetch attempt $i failed; retrying in 10s" >&2
sleep 10
done
exit 1
- run: zig build test-all -Doptimize=ReleaseSafe --summary all
nix:
name: nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@v22
- run: nix flake check
- run: nix build -L
- run: nix run . -- version