-
Notifications
You must be signed in to change notification settings - Fork 0
204 lines (193 loc) · 7.55 KB
/
Copy pathci.yml
File metadata and controls
204 lines (193 loc) · 7.55 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install clang (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y clang
- name: Install LLVM-MinGW clang (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$ver = "20260616"
$name = "llvm-mingw-$ver-ucrt-x86_64"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$ver/$name.zip"
$zip = Join-Path $env:RUNNER_TEMP "$name.zip"
$dest = "C:\$name"
Write-Host "Downloading $url"
Invoke-WebRequest -Uri $url -OutFile $zip
Expand-Archive -Path $zip -DestinationPath "C:\" -Force
$bin = Join-Path $dest "bin"
Add-Content -Path $env:GITHUB_PATH -Value $bin
& (Join-Path $bin "clang.exe") --version
- name: Test
run: cargo test --workspace --all-targets --locked
suite5-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build rynixc
run: cargo build -p rynixc --release
- name: Suite5 checksum gate (C + Rynix)
run: python benchmarks/suite5/run_suite5.py --langs c,rynix
arch-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build rynixc
run: cargo build -p rynixc --release
- name: Architecture.toml gate
run: cargo run -p rynixc --release -- arch check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy (rynixc + pipeline)
# Pedantic stays `warn` in Cargo.toml for local signal; CI denies default
# groups only — pedantic flood must not block the merge gate.
run: >
cargo clippy -p rynixc -p rynix-rir -p rynix-codegen -p rynix-sema --
-D warnings -A clippy::pedantic
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
arguments: --all-features
vscode-extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Compile VS Code extension
working-directory: editors/vscode
run: npm ci && npm run compile
sanitizer-rt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Fiber park/unpark smoke (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/fiber_park_smoke.c -o /tmp/fiber_park
/tmp/fiber_park
- name: Fiber smoke (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/fiber_smoke.c -o /tmp/fiber_smoke
/tmp/fiber_smoke
- name: Echo pipe smoke (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/echo_smoke.c -o /tmp/echo_smoke
/tmp/echo_smoke
- name: TCP echo RPS (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/tcp_echo_rps.c -o /tmp/tcp_echo
/tmp/tcp_echo
- name: Load harness RPS floor (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/load_harness.c -o /tmp/load_harness
/tmp/load_harness
- name: JSON parse smoke (ASan+UBSan)
run: |
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/json_smoke.c -o /tmp/json_smoke
/tmp/json_smoke
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/json_unit.c -o /tmp/json_unit
/tmp/json_unit
clang -O1 -g -fsanitize=address,undefined -I rt/include \
rt/portable.c rt/tests/http_smoke.c -o /tmp/http_smoke
/tmp/http_smoke
- name: Uring build + SQE + TCP smoke
run: |
clang -O1 -DRYNIX_RT_URING -I rt/include \
rt/portable.c rt/tests/fiber_smoke.c -o /tmp/fiber_uring
/tmp/fiber_uring
clang -O1 -DRYNIX_RT_URING -I rt/include \
rt/portable.c rt/tests/uring_sqe_smoke.c -o /tmp/uring_sqe
/tmp/uring_sqe
clang -O1 -DRYNIX_RT_URING -I rt/include \
rt/portable.c rt/tests/tcp_echo_rps.c -o /tmp/tcp_uring
/tmp/tcp_uring
clang -O1 -DRYNIX_RT_URING -I rt/include \
rt/portable.c rt/tests/load_harness.c -o /tmp/load_uring
/tmp/load_uring
size-gate:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install LLVM-MinGW clang (PATH)
shell: pwsh
run: |
$ver = "20260616"
$name = "llvm-mingw-$ver-ucrt-x86_64"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$ver/$name.zip"
$zip = Join-Path $env:RUNNER_TEMP "$name.zip"
$dest = "C:\$name"
if (-not (Test-Path (Join-Path $dest "bin\clang.exe"))) {
Write-Host "Downloading $url"
Invoke-WebRequest -Uri $url -OutFile $zip
Expand-Archive -Path $zip -DestinationPath "C:\" -Force
}
$bin = Join-Path $dest "bin"
Add-Content -Path $env:GITHUB_PATH -Value $bin
& (Join-Path $bin "clang.exe") --version
- name: Binary size gate (hello <300KiB + RT smokes)
# cargo accepts only one TESTNAME filter; run each gate separately.
run: |
cargo test -p rynixc --test size_echo_gates hello_binary_under_300kb -- --nocapture
cargo test -p rynixc --test size_echo_gates crypto_kv_smoke_c -- --nocapture
cargo test -p rynixc --test size_echo_gates tls_echo_smoke_c -- --nocapture
# Optional: when `endc`/`end` is on PATH (self-hosted or ENDC_PATH), also gate End.
# Default GitHub-hosted runners skip cleanly — not a required green badge without endc.
suite5-with-end:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build rynixc
run: cargo build -p rynixc --release
- name: Suite5 C + Rynix + End (skip if no endc)
env:
ENDC_PATH: ${{ vars.ENDC_PATH }}
run: |
set -e
if [ -n "$ENDC_PATH" ] && [ -x "$ENDC_PATH" ]; then
export PATH="$(dirname "$ENDC_PATH"):$PATH"
fi
if command -v endc >/dev/null 2>&1 || command -v end >/dev/null 2>&1; then
echo "endc/end found — running Suite5 with end"
python benchmarks/suite5/run_suite5.py --langs c,rynix,end
else
echo "skip: endc/end not on PATH (set repo variable ENDC_PATH on self-hosted runners)"
fi