-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (57 loc) · 1.6 KB
/
Copy pathci.yml
File metadata and controls
74 lines (57 loc) · 1.6 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
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
ZIG_VERSION: "0.16.0"
jobs:
test:
name: test py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Zig
uses: mlugg/setup-zig@v2.2.1
with:
version: ${{ env.ZIG_VERSION }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
- name: Print tool versions
run: |
zig version
python --version
- name: Check whitespace
run: git show --check --format=short --no-renames HEAD
- name: Check Zig formatting
run: |
zig fmt --check build.zig build.zig.zon
find src -name '*.zig' -print0 | sort -z | xargs -0 zig fmt --check
- name: Run public-safety scan
run: python scripts/check_public_safety.py
- name: Check runtime boundary
run: python scripts/check_runtime_boundary.py
- name: Build Zig binary
run: zig build --summary all
- name: Run Zig tests
run: zig build test --summary all
- name: Build release-safe binary
run: zig build -Doptimize=ReleaseSafe --summary all
- name: Run tests
run: pytest -q