Repository navigation
690 lines (633 loc) · 28.9 KB
/
Copy pathci.yml
File metadata and controls
690 lines (633 loc) · 28.9 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
env:
MAKO_GFX_HEADLESS: "1"
MAKO_STD: ${{ github.workspace }}/std
jobs:
ci-honesty:
name: CI honesty policy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check hard gates and quarantines
run: bash scripts/ci-honesty-check.sh
native:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
MAKO_RUNTIME: ${{ github.workspace }}/runtime
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install clang + OpenSSL (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y clang libssl-dev
- name: Ensure LLVM/clang (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$clang = Get-Command clang -ErrorAction SilentlyContinue
if (-not $clang) {
choco install llvm -y
$candidates = @(
"C:\Program Files\LLVM\bin",
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin",
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin"
)
foreach ($c in $candidates) {
if (Test-Path "$c\clang.exe") {
echo "$c" >> $env:GITHUB_PATH
break
}
}
}
$clang = Get-Command clang -ErrorAction SilentlyContinue
if (-not $clang) {
Write-Error "clang is required for Windows CI hard gates"
exit 1
}
clang --version
- name: Build
run: cargo build --release
- name: Version
shell: bash
run: ./target/release/mako --version
- name: Help
shell: bash
run: ./target/release/mako --help
- name: JSON test report
if: runner.os != 'Windows'
shell: bash
run: |
set -o pipefail
./target/release/mako test examples/testing/add_test.mko --json --coverage --backend c |
python -c 'import json,sys; r=json.load(sys.stdin); assert r["schemaVersion"] == 1 and r["ok"] and r["summary"]["passed"] == 1 and r["summary"]["tests"] == 3 and r["runs"][0]["coverage"]["testFunctions"] == 3 and r["runs"][0]["files"][0]["stdout"].splitlines()[-1] == "PASS"'
set +e
failure_json="$(./target/release/mako test examples/ci/json_report_failure_test.mko --json --backend c)"
failure_status=$?
set -e
test "$failure_status" -ne 0
printf '%s' "$failure_json" |
python -c 'import json,sys; r=json.load(sys.stdin); f=r["runs"][0]["files"][0]; assert not r["ok"] and f["status"] == "failed" and f["failure"]["kind"] == "exit"'
- name: JSON check report
if: runner.os != 'Windows'
shell: bash
run: |
legacy_json="$(./target/release/mako check --json examples/testing/add_test.mko)"
printf '%s' "$legacy_json" |
python -c 'import json,sys; r=json.load(sys.stdin); assert isinstance(r, list) and r[0]["ok"] and "schemaVersion" not in r[0]'
versioned_json="$(./target/release/mako check --json=v1 examples/testing/add_test.mko)"
printf '%s' "$versioned_json" |
python -c 'import json,sys; r=json.load(sys.stdin); assert r["schemaVersion"] == 1 and r["command"] == "check" and r["ok"] and r["summary"]["passed"] == 1'
set +e
failure_json="$(./target/release/mako check --json=v1 examples/bad/labeled_break_unknown.mko)"
failure_status=$?
set -e
test "$failure_status" -ne 0
printf '%s' "$failure_json" |
python -c 'import json,sys; r=json.load(sys.stdin); assert not r["ok"] and r["summary"]["failed"] == 1 and r["targets"][0]["diagnostics"]'
set +e
resolution_json="$(./target/release/mako check --json=v1 examples/ci/missing-check-input.mko 2>/dev/null)"
resolution_status=$?
set -e
test "$resolution_status" -ne 0
printf '%s' "$resolution_json" |
python -c 'import json,sys; r=json.load(sys.stdin); assert not r["ok"] and not r["targets"] and r["errors"]'
- name: Validate compiler benchmark matrix
if: runner.os == 'Linux'
run: >-
python scripts/bench-compile.py
--root "${{ runner.temp }}/mako-compile-bench"
--generate-only
- name: Compile benchmark build smoke
if: runner.os == 'Linux'
run: >-
python scripts/bench-compile.py
--root "${{ runner.temp }}/mako-compile-bench"
--sizes 10000
--shapes single generic
--repeat 1
--build
--output "${{ runner.temp }}/mako-compile-build-bench.json"
- name: Compile benchmark fixture smoke
run: >-
python scripts/bench-compile.py
--root "${{ runner.temp }}/mako-compile-bench"
--sizes 1000
--repeat 1
--output "${{ runner.temp }}/mako-compile-bench.json"
- name: Upload compiler benchmark sample
uses: actions/upload-artifact@v4
with:
name: mako-compile-bench-${{ matrix.os }}
path: ${{ runner.temp }}/mako-compile-*.json
- name: Recursive debug compiler (Windows)
if: runner.os == 'Windows'
shell: bash
run: cargo run --quiet --release --bin mako -- test examples/testing/deep_expr_stack_test.mko --backend c
env:
MAKO_COMPILER_STACK_MB: "64"
RUST_MIN_STACK: "8388608"
- name: Default test suite (Linux/macOS)
if: runner.os != 'Windows'
shell: bash
run: cargo run --quiet --release --bin mako -- test examples/testing --backend c
env:
MAKO_TEST_TIMEOUT_SECS: "90"
MAKO_LIVE_TLS: ""
MAKO_LIVE_NGHTTP2: ""
MAKO_LIVE_QUIC: ""
# Native backend test suite: hard gate on Linux/macOS. C remains the
# oracle, but the native path may not regress or silently fall back to C.
- name: Native backend test suite (Linux/macOS)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
cargo run --quiet --release --bin mako -- test examples/testing --backend native
env:
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_LIVE_TLS: ""
MAKO_LIVE_NGHTTP2: ""
MAKO_LIVE_QUIC: ""
# Windows full suite is a hard gate with explicit quarantine:
# known platform gaps are listed in ci/windows-quarantine.txt, new
# failures fail CI, and recovered quarantines fail until removed.
- name: Windows quarantined full suite (hard gate)
if: runner.os == 'Windows'
shell: bash
run: bash scripts/windows-quarantine-gate.sh
env:
MAKO_TEST_TIMEOUT_SECS: "90"
MAKO_BACKEND: c
MAKO_LIVE_TLS: ""
MAKO_LIVE_NGHTTP2: ""
MAKO_LIVE_QUIC: ""
- name: Core language tests (Windows — must pass)
if: runner.os == 'Windows'
shell: bash
env:
MAKO_TEST_TIMEOUT_SECS: "90"
MAKO_BACKEND: c
run: |
cargo run --quiet --release --bin mako -- test examples/testing/match_guard_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/match_or_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/generic_bounds_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/collections_list_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/slice_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/enum_method_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/generic_enum_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/fstring_fmt_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/asan_stress_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/own_branch_regress_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/double_free_guard_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/match_own_free_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/early_return_path_free_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/add_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/context_mako_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/json_mako_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/collections_mako_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/crew_fan_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/kick_fn_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/job_join_typed_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/actor_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/wave8_queue_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/wave10_queue_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/bufio_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/db_engine_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/file_env_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/fs_polish_test.mko
cargo run --quiet --release --bin mako -- test examples/testing/plugin_product_test.mko
- name: Windows storage I/O
if: runner.os == 'Windows'
shell: pwsh
run: |
cargo run --quiet --release --bin mako -- test examples/testing/storage_portable_io_test.mko --backend c
cargo run --quiet --release --bin mako -- test examples/ci/windows_direct_io_test.mko --backend c
env:
MAKO_TEST_TIMEOUT_SECS: "90"
- name: Init smoke
shell: bash
run: |
./target/release/mako init "${RUNNER_TEMP}/mako-ci-demo" --name ci-demo
if [ "$RUNNER_OS" = "Windows" ]; then
./target/release/mako run "${RUNNER_TEMP}/mako-ci-demo/main.mko" --backend c
else
./target/release/mako run "${RUNNER_TEMP}/mako-ci-demo/main.mko"
fi
# 0.4.9 49-B: doctor + init/run install smoke on every primary host.
- name: Install / doctor smoke
shell: bash
run: ./scripts/install-smoke.sh
env:
MAKO_BIN: ${{ github.workspace }}/target/release/mako
# 0.5.15: normal-user tooling surface should be boring and stable.
- name: Tooling polish smoke
shell: bash
run: ./scripts/tooling-polish-smoke.sh
env:
MAKO: ${{ github.workspace }}/target/release/mako
# 0.4.10 LR-1: years-up steady-state (Unix; Windows soak later).
- name: Long-run soak (RSS + ownership)
if: runner.os != 'Windows'
shell: bash
run: ./scripts/long-run-soak.sh
env:
MAKO_BIN: ${{ github.workspace }}/target/release/mako
MAKO_LONG_RUN_BACKEND: c
# 0.4.11 LR-6: HTTP accept loop under concurrent clients.
- name: HTTP long-run soak
if: runner.os != 'Windows'
shell: bash
run: ./scripts/http-long-run-soak.sh
env:
MAKO_BIN: ${{ github.workspace }}/target/release/mako
MAKO_HTTP_SOAK_BACKEND: c
MAKO_HTTP_SOAK_REQUESTS: "1200"
MAKO_HTTP_SOAK_CLIENTS: "8"
MAKO_HTTP_SOAK_PORT: "19810"
- name: Intel macOS cross-artifact smoke
if: runner.os == 'macOS'
shell: bash
run: |
./target/release/mako build examples/hello.mko \
--backend c \
--target x86_64-apple-darwin -o "${RUNNER_TEMP}/hello-macos-x86_64"
./scripts/verify-target-artifact.sh \
x86_64-apple-darwin "${RUNNER_TEMP}/hello-macos-x86_64"
# 0.4.9 49-A: optimizing LLVM backend (macOS + bundled lldMachO only).
# Linux/Windows skip is documented in scripts/llvm-backend-test.sh and BUILD.md.
llvm-backend:
name: LLVM backend (macOS)
runs-on: macos-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install LLVM 21 + cmake
run: |
brew install llvm@21 cmake
echo "LLVM_SYS_211_PREFIX=$(brew --prefix llvm@21)" >> "$GITHUB_ENV"
echo "$(brew --prefix llvm@21)/bin" >> "$GITHUB_PATH"
- name: Cache static lld toolchain
uses: actions/cache@v4
id: lld-cache
with:
path: out/native-toolchain
key: native-toolchain-llvmorg-21.1.8-${{ runner.os }}-${{ runner.arch }}-v1
- name: Bootstrap static lld (cache miss)
if: steps.lld-cache.outputs.cache-hit != 'true'
run: ./scripts/bootstrap-native-toolchain.sh
env:
MAKO_LLVM_PREFIX: ${{ env.LLVM_SYS_211_PREFIX }}
- name: Export lld env
run: |
echo "MAKO_LLD_STATIC_DIR=${{ github.workspace }}/out/native-toolchain/lld-build/lib" >> "$GITHUB_ENV"
echo "MAKO_LLD_INCLUDE_DIR=${{ github.workspace }}/out/native-toolchain/llvm-project-llvmorg-21.1.8/lld/include" >> "$GITHUB_ENV"
test -f out/native-toolchain/lld-build/lib/liblldMachO.a
test -f out/native-toolchain/llvm-project-llvmorg-21.1.8/lld/include/lld/Common/Driver.h
- name: LLVM backend correctness gate
run: ./scripts/llvm-backend-test.sh
env:
MAKO_RUNTIME: ${{ github.workspace }}/runtime
# Fail hard on macOS when toolchain is present (do not soft-skip).
MAKO_LLVM_SKIP_IF_UNAVAILABLE: "0"
native-memory-safety:
name: Native backend memory safety (macOS)
runs-on: macos-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Native differential + GuardMalloc + leaks gate
run: ./scripts/native-compiler-test.sh
env:
MAKO_RUNTIME: ${{ github.workspace }}/runtime
cross-smoke:
name: Cross-compile artifacts (Windows + Linux musl + WASI)
runs-on: ubuntu-latest
env:
MAKO_BACKEND: c
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang + zig
run: |
sudo apt-get update
sudo apt-get install -y clang xz-utils
curl -sL https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz | sudo tar -xJ -C /opt
echo "/opt/zig-linux-x86_64-0.13.0" >> "$GITHUB_PATH"
- name: Build mako
run: cargo build --release
- name: Cross-compile hello to Windows
run: |
./target/release/mako init /tmp/mako-cross --name cross-hello
./target/release/mako build /tmp/mako-cross/main.mko \
--target x86_64-pc-windows-gnu \
-o /tmp/mako-cross/hello.exe
./scripts/verify-target-artifact.sh \
x86_64-pc-windows-gnu /tmp/mako-cross/hello.exe
- name: Cross-compile static Linux musl hello
run: |
./target/release/mako init /tmp/mako-musl --name musl-hello
./target/release/mako build /tmp/mako-musl/main.mko \
--target x86_64-unknown-linux-musl \
-o /tmp/mako-musl/hello-static
./scripts/verify-target-artifact.sh \
x86_64-unknown-linux-musl /tmp/mako-musl/hello-static --static
- name: Cross-compile static Linux musl ARM64 hello
run: |
./target/release/mako init /tmp/mako-musl-arm64 --name musl-arm64-hello
./target/release/mako build /tmp/mako-musl-arm64/main.mko \
--target aarch64-unknown-linux-musl \
-o /tmp/mako-musl-arm64/hello-static
./scripts/verify-target-artifact.sh \
aarch64-unknown-linux-musl /tmp/mako-musl-arm64/hello-static --static
- name: Cross-compile WASI hello
run: |
./target/release/mako init /tmp/mako-wasi --name wasi-hello
./target/release/mako build /tmp/mako-wasi/main.mko \
--target wasm32-wasip1 -o /tmp/mako-wasi/hello.wasm
./scripts/verify-target-artifact.sh \
wasm32-wasip1 /tmp/mako-wasi/hello.wasm
- name: Upload cross artifact
uses: actions/upload-artifact@v4
with:
name: mako-cross-x86_64-pc-windows-gnu-hello
path: |
/tmp/mako-cross/hello.exe
/tmp/mako-musl/hello-static
/tmp/mako-musl-arm64/hello-static
/tmp/mako-wasi/hello.wasm
bench-gate:
name: Bench gate vs Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build mako
run: cargo build --release
- name: Run bench-gate contract budgets
run: ./scripts/bench-gate.sh || ./scripts/bench-gate.sh
bench-gate-strict:
name: Performance contract strict 1.5×
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build mako
run: cargo build --release
- name: Run performance contract
run: ./scripts/performance-contract.sh || ./scripts/performance-contract.sh
claims-gate:
name: Product claims gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang libssl-dev libsqlite3-dev ripgrep xz-utils
curl -sL https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz | sudo tar -xJ -C /opt
echo "/opt/zig-linux-x86_64-0.13.0" >> "$GITHUB_PATH"
- name: Build mako
run: cargo build --release
- name: Verify claims and regression fixtures
env:
MAKO_CACHE: ${{ runner.temp }}/mako-claims-cache
MAKO_BACKEND: c
run: ./scripts/claims-gate.sh
tsan:
name: TSan concurrency smoke
runs-on: ubuntu-latest
env:
MAKO_BACKEND: c
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build mako
run: cargo build --release
- name: Race-test concurrent suite
run: |
./target/release/mako test --race --backend c examples/testing/actor_multifile/actor_test.mko
./target/release/mako test --race --backend c examples/testing/actor_batch_test.mko
./target/release/mako test --race --backend c examples/testing/actor_sharding_test.mko
./target/release/mako test --race --backend c examples/testing/actor_adversarial_memsafe_test.mko
./target/release/mako test --race examples/testing/crew_fan_test.mko
./target/release/mako test --race examples/testing/kick_send_test.mko
./target/release/mako test --race examples/testing/kick_share_test.mko
./target/release/mako test --race examples/testing/kick_sync_test.mko
./target/release/mako test --race examples/testing/chan_struct_test.mko
./target/release/mako test --race examples/testing/chan_float_test.mko
./target/release/mako test --race examples/testing/crew_drain_test.mko
./target/release/mako test --race examples/testing/job_join_typed_test.mko
./target/release/mako test --race examples/testing/proxy_pool_test.mko
./target/release/mako test --race examples/testing/proxy_edge_test.mko
./target/release/mako test --race examples/testing/wave11_queue_test.mko
./target/release/mako test --race examples/testing/fan_string_test.mko
./target/release/mako test --race examples/testing/kick_string_test.mko
./target/release/mako test --race examples/testing/wave14_queue_test.mko
./target/release/mako test --race examples/testing/wave15_queue_test.mko
./target/release/mako test --race examples/testing/wave16_queue_test.mko
./target/release/mako test --race examples/testing/wave17_queue_test.mko
./target/release/mako test --race examples/testing/wave18_queue_test.mko
./target/release/mako test --race examples/testing/wave19_queue_test.mko
./target/release/mako test --race examples/testing/wave20_queue_test.mko
./target/release/mako test --race examples/testing/wave21_queue_test.mko
./target/release/mako test --race examples/testing/wave22_queue_test.mko
./target/release/mako test --race examples/testing/wave23_queue_test.mko
./target/release/mako test --race examples/testing/wave24_queue_test.mko
./target/release/mako test --race examples/testing/wave25_queue_test.mko
./target/release/mako test --race examples/testing/wave26_queue_test.mko
./target/release/mako test --race examples/testing/wave27_queue_test.mko
./target/release/mako test --race examples/testing/wave28_queue_test.mko
./target/release/mako test --race examples/testing/wave29_queue_test.mko
./target/release/mako test --race examples/testing/wave30_queue_test.mko
./target/release/mako test --race examples/testing/wave31_queue_test.mko
./target/release/mako test --race examples/testing/wave32_queue_test.mko
./target/release/mako test --race examples/testing/wave33_queue_test.mko
./target/release/mako test --race examples/testing/wave34_queue_test.mko
./target/release/mako test --race examples/testing/wave35_queue_test.mko
./target/release/mako test --race examples/testing/wave36_queue_test.mko
./target/release/mako test --race examples/testing/wave37_queue_test.mko
./target/release/mako test --race examples/testing/wave38_queue_test.mko
./target/release/mako test --race examples/testing/share_atomic_test.mko
./target/release/mako test --race examples/testing/kick_sync_test.mko
./target/release/mako test --race examples/testing/cmap_stress_test.mko
./target/release/mako test --race examples/testing/kick_share_test.mko
./target/release/mako test --race examples/testing/job_join_typed_test.mko
./target/release/mako test --race examples/testing/select_nll_test.mko
./target/release/mako test --race examples/testing/chan_string_test.mko
./target/release/mako test --race examples/testing/chan_struct_test.mko
./target/release/mako test --race examples/testing/chan_float_test.mko
./target/release/mako test --race examples/testing/crew_fan_test.mko
./target/release/mako test --race examples/testing/crew_drain_test.mko
./target/release/mako test --race examples/testing/shared_array_crew_test.mko
MAKO_RT_STRESS_SEED=7 MAKO_RT_STRESS_ROUNDS=8 ./target/release/mako test --race examples/testing/chan_select_stress_test.mko
MAKO_RT_STRESS_SEED=104729 MAKO_RT_STRESS_ROUNDS=8 ./target/release/mako test --race examples/testing/chan_select_stress_test.mko
asan:
name: ASan invalid memory access
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Check CMap integer temporary ownership
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1
run: |
clang -std=c11 -O1 -g -fno-omit-frame-pointer -fsanitize=address,undefined -Iruntime examples/testing/cmap_integer_leak_test.c -o /tmp/cmap-integer-leak-test -pthread -lm
/tmp/cmap-integer-leak-test
- name: Build mako
run: cargo build --release
- name: Run full suite under AddressSanitizer
env:
ASAN_OPTIONS: detect_leaks=0
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing
- name: Check byte conversion cleanup
env:
ASAN_OPTIONS: detect_leaks=1
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: ./target/release/mako test --sanitize address examples/testing/byte_conversion_cleanup_test.mko
- name: Check discarded bag cleanup
env:
ASAN_OPTIONS: detect_leaks=1
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing/discarded_bag_drop_test.mko
- name: Check nested struct-array recursive cleanup
env:
ASAN_OPTIONS: detect_leaks=1
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing/struct_clone_nested_if_test.mko
- name: Check owned struct-field move cleanup
env:
ASAN_OPTIONS: detect_leaks=1
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing/owned_field_move_test.mko
- name: Check exec-result field move reassignment
env:
ASAN_OPTIONS: detect_leaks=1
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing/exec_result_field_move_test.mko
- name: Check borrowed bag discard
env:
ASAN_OPTIONS: detect_leaks=0
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize address examples/testing/discarded_bag_borrow_test.mko
- name: Check map key ownership
env:
ASAN_OPTIONS: detect_leaks=0
MAKO_TEST_TIMEOUT_SECS: "120"
run: |
./target/release/mako test --sanitize address --backend c examples/testing/map_set_take_alias_test.mko
ubsan:
name: UBSan undefined behavior
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build mako
run: cargo build --release
- name: Run full suite under UndefinedBehaviorSanitizer
env:
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: |
./target/release/mako test --sanitize undefined examples/testing
memory-safety:
name: Memory safety gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y clang ripgrep
- name: Build mako
run: cargo build --release
- name: Memory safety gate
env:
MAKO_RUNTIME: ${{ github.workspace }}/runtime
MAKO_MS_SKIP_HTTP: "1"
run: ./scripts/memory-safety-gate.sh
sanitizer-sweep:
name: Sanitizer sweep
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Build mako
run: cargo build --release
- name: Sanitizer sweep (quick)
env:
MAKO_RUNTIME: ${{ github.workspace }}/runtime
MAKO_TEST_TIMEOUT_SECS: "120"
MAKO_BACKEND: c
run: MAKO_BACKEND=c ./scripts/sanitize-all.sh --quick
gcc:
name: GCC compilation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust + GCC
uses: dtolnay/rust-toolchain@stable
- name: Install GCC
run: sudo apt-get update && sudo apt-get install -y gcc
- name: Build mako
run: cargo build --release
- name: Run full suite compiled with GCC
env:
MAKO_CC: gcc
MAKO_BACKEND: c
MAKO_TEST_TIMEOUT_SECS: "90"
run: |
./target/release/mako test examples/testing