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
when:
- event: ["push", "pull_request"]
branch: main
engine: nixery
dependencies:
nixpkgs:
- coreutils
- curl
- gnutar
- xz
- git
steps:
- name: install pinned zig
command: scripts/ci-zig.sh /tangled/workspace/.zig
- name: fetch dependencies
command: |
# tangled.org rate-limits archive downloads; retry with backoff.
ok=0
for attempt in 1 2 3 4 5; do
if /tangled/workspace/.zig/zig build --fetch; then ok=1; break; fi
echo "dependency fetch attempt $attempt failed; retrying" >&2
sleep $((attempt * 15))
done
[ "$ok" = 1 ]
- name: check formatting
command: /tangled/workspace/.zig/zig fmt --check build.zig build.zig.zon src scripts
- name: test
command: /tangled/workspace/.zig/zig build test --summary all
- name: build production configuration
command: /tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe -Dbackend=zio -Dtarget=x86_64-linux-gnu --summary all
- name: build threaded fallback
command: /tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe --summary all