Repository navigation
71 lines (70 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
71 lines (70 loc) · 2.23 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
name: ci
on:
push:
pull_request:
schedule:
- cron: "17 4 * * 1"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
# setup-zig checks the tarball's minisign signature against the Zig
# project's key.
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.17.1
- run: zig fmt --check build.zig build.zig.zon src
- run: zig build test --summary all
- name: no site names in the tree
run: |
! git grep -nIiE 'snellius|surf\.nl|/gpfs/|/projects/0|rg\.terra|scratch-shared' -- . ':!.github/workflows/ci.yml'
# Every tool built and tested against this commit of the library, with its
# pinned zig-common replaced by this checkout.
tools:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- repo: stackhands/eb-keep-logs
ref: zig
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
path: zig-common
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
repository: ${{ matrix.repo }}
ref: ${{ matrix.ref }}
path: tool
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.17.1
- name: point the tool at this checkout
working-directory: tool
run: |
python3 - <<'PY'
import re
p = "build.zig.zon"
s = open(p).read()
s, n = re.subn(r"\.zig_common = \.\{[^}]*\}", '.zig_common = .{ .path = "../zig-common" }', s)
assert n == 1, "no zig_common dependency"
open(p, "w").write(s)
PY
- working-directory: tool
run: zig build test --summary all