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
78
79
# A push runs this only when it touches something the binary, the image or the
# gate is built from. Site, docs and receipt commits do not: on 2026-11-13 nine
# site-only pushes each compiled RocksDB three times here and started a
# bare-metal gate, which saturated the CI host. The site ships with `just
# site` and is checked by site.yml.
when:
- event: ["push", "pull_request"]
branch: ["main", "zig-0.17"]
paths:
- "build.zig"
- "build.zig.zon"
- "Dockerfile"
- ".dockerignore"
- "justfile"
- "src/**"
- "tools/**"
- "scripts/**"
- "examples/**"
- "tests/**/*.py"
- "tests/fixtures/**"
- "tests/upstream_oracle/**"
- "tests/*.csv"
- "tests/*.Dockerfile"
- "deploy/ops/**"
- "deploy/security/**"
- "deploy/grafana/**"
- "deploy/prometheus/**"
- "strata/service/**"
- ".tangled/workflows/ci.yml"
- event: ["manual"]
engine: nixery
dependencies:
nixpkgs:
- curl
- gnutar
- xz
- coreutils
steps:
- name: install zig 0.17
command: |
set -eu
curl -fSL https://ziglang.org/download/0.17.1/zig-x86_64-linux-0.17.1.tar.xz -o /tangled/workspace/zig.tar.xz
echo "3581863e3cbcfd0fce0efc682ce7e9e93da96668a977791d356a26d2a7e9b17a /tangled/workspace/zig.tar.xz" | sha256sum --check
tar -xJf /tangled/workspace/zig.tar.xz -C /tangled/workspace
mv /tangled/workspace/zig-x86_64-linux-0.17.1 /tangled/workspace/.zig
- name: check formatting
command: |
/tangled/workspace/.zig/zig fmt --check build.zig build.zig.zon src tools/loadgen/build.zig tools/loadgen/build.zig.zon tools/loadgen/src
- name: fetch packages
command: |
set -eu
for attempt in 1 2 3 4 5 6 7 8; do
if /tangled/workspace/.zig/zig build --fetch; then exit 0; fi
if [ "$attempt" -lt 8 ]; then sleep 15; fi
done
exit 1
- name: unit tests (debug)
command: |
/tangled/workspace/.zig/zig build test --summary all
- name: unit tests (releasesafe)
command: |
/tangled/workspace/.zig/zig build test -Doptimize=ReleaseSafe --summary all
- name: production build
command: |
/tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe -Dcpu=baseline -Dtarget=x86_64-linux-gnu
- name: load generator
command: |
cd tools/loadgen
/tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe -Dcpu=baseline -Dtarget=x86_64-linux-gnu