Repository navigation
105 lines (104 loc) · 3.73 KB
/
Copy pathci.yml
File metadata and controls
105 lines (104 loc) · 3.73 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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
# The decimal digit table is pinned to Unicode 16.0.0, the unicodedata
# of Python 3.14; the parity test skips its comparison under another.
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.14.10"
- run: zig fmt --check build.zig build.zig.zon src tests
- run: zig build test --summary all
- name: parity with python's json and text calls
run: |
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found, skipping the parity test"
exit 0
fi
zig build parity-probe
python3 tests/test_json_pytext_parity.py
- name: parity with python's filesystem and lock calls
run: |
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found, skipping the parity test"
exit 0
fi
zig build fs-lock-parity-probe
python3 tests/test_fs_lock_parity.py
- name: parity with python's tempfile.gettempdir
run: |
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found, skipping the parity test"
exit 0
fi
zig build tempdir-probe
python3 tests/test_gettempdir_parity.py
- name: parity with python 3.14 argparse calls
run: |
python3 -c "import sys; assert sys.version_info[:3] == (3, 14, 10), 'argparse parity is pinned to Python 3.14.10; found ' + sys.version.split()[0]"
zig build argparse-parity-probe
python3 tests/test_argparse_parity.py
- 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: zig-common
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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