Skip to content

bench(intl): isolate DateTimeFormat resolved state (#572) #2642

bench(intl): isolate DateTimeFormat resolved state (#572)

bench(intl): isolate DateTimeFormat resolved state (#572) #2642

Workflow file for this run

name: CI
# Runs the docs/threads/testing.md "Required Checks" — crucially the
# ThreadSanitizer gates that surface the no-GIL races blocking the execution-path
# GIL drop. The toolchain comes from pantry's own action (`zig@0.17.0-dev`),
# which resolves the current 0.17.0-dev master (≥0.17.0-dev.956) from
# ziglang.org/download/index.json — so the pin tracks upstream automatically
# instead of going stale. At ≥dev.956 TSan now builds on macOS too; CI keeps
# running it on Linux as the shared gate. (The older dev.131 pin could not build
# TSan on darwin — bundled libcxx failed with `undeclared identifier 'INFINITY'`
# — which is why this was Linux-only before.)
#
# Triggers: pull_request + push-to-main + manual dispatch + nightly schedule. The
# no-GIL TSan corpus gate and test262-parallel leg now run on
# every PR and main push (production gating), not just nightly.
on:
pull_request:
push:
branches: [main] # this project lands directly on main, so gate main pushes too
workflow_dispatch:
inputs:
nightly_tsan_default_iters:
description: 'Manual nightly-threadfuzz-tsan default-profile iterations'
required: false
default: '120'
nightly_tsan_midgc_iters:
description: 'Manual nightly-threadfuzz-tsan mid-GC profile iterations'
required: false
default: '5'
nightly_tsan_lifecycle_iters:
description: 'Manual nightly-threadfuzz-tsan lifecycle profile iterations'
required: false
default: '5'
schedule:
- cron: '0 7 * * *' # nightly continuous validation (incl. the race-hunt probe)
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# Each Required Check runs as its own matrix leg (fail-fast: false), so an
# unrelated failure in one (e.g. the full unit suite) does not mask the
# threading / ThreadSanitizer gates.
gate:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- name: unit (shard 0/4)
cmd: zig build test -Dunit-shard-index=0 -Dunit-shard-count=4
- name: unit (shard 1/4)
cmd: zig build test -Dunit-shard-index=1 -Dunit-shard-count=4
- name: unit (shard 2/4)
cmd: zig build test -Dunit-shard-index=2 -Dunit-shard-count=4
- name: unit (shard 3/4)
cmd: zig build test -Dunit-shard-index=3 -Dunit-shard-count=4
- name: threads-gil (shard 0/4)
cmd: zig build threads-test -Dthreads-shard-index=0 -Dthreads-shard-count=4
- name: threads-gil (shard 1/4)
cmd: zig build threads-test -Dthreads-shard-index=1 -Dthreads-shard-count=4
- name: threads-gil (shard 2/4)
cmd: zig build threads-test -Dthreads-shard-index=2 -Dthreads-shard-count=4
- name: threads-gil (shard 3/4)
cmd: zig build threads-test -Dthreads-shard-index=3 -Dthreads-shard-count=4
- name: threads-nogil-witness
cmd: zig build threads-test -Dthreads-parallel-js=true -Dthreads-case=sync/condition-wait-notify.js
# PR-249 corpus hygiene: reject inventory/disposition drift and verify
# the bounded terminal-premise probes against the installed runner.
- name: threads-reference-audit
home_tool: true
cmd: zig build threads-reference-audit threads-reference-probes
# Bounded witness for the #430 execution inventory. The complete
# artifact is a deliberate hours-long reproduction; this keeps the
# tooling that produces it from rotting silently, on every push.
- name: threads-execution-inventory-witness
home_tool: true
cmd: |
zig build threads-test -Dthreads-case=smoke.js,jit/int-gate-epoch-reclaim.js -Dthreads-inventory="$RUNNER_TEMP/pr249-exec.json"
jq -e '.schema_version == 2 and .build_mode == "Debug" and .summary.cases == 2 and .summary.failed == 0 and .mode == "serialized" and all(.cases[]; has("case") and has("mode") and has("ms") and has("result") and has("optimizer_publications") and has("optimizer_invalidations"))' "$RUNNER_TEMP/pr249-exec.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/pr249-terminal-execution.ts --check
- name: benchmark-comparison-harness
home_tool: true
cmd: zig build benchmark-comparison-test
- name: dependency-audit
cmd: zig build dependency-audit
- name: wasm-feature-profiles
home_tool: true
cmd: zig build wasm-feature-profiles-check -Dhome-tool="$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool"
# Revision drift, converter compatibility, and the densest MVP
# linking/store path stay gated without putting the multi-minute
# complete 73-file inventory on every CI run.
- name: wasm-mvp-smoke
wasm_spec: true
cmd: |
zig build wasm-spec -Dwast2json="$RUNNER_TEMP/wabt-1.0.12/wast2json" -Dwasm-spec-filter=linking -Dwasm-spec-inventory="$RUNNER_TEMP/wasm-spec-linking.json"
zig build wasm-spec -Dwast2json="$RUNNER_TEMP/wabt-1.0.12/wast2json" -Dwasm-spec-filter=f32_bitwise -Dwasm-spec-inventory="$RUNNER_TEMP/wasm-spec-bit-exact.json"
# Exact pins plus one bounded witness from each completed Core 2
# structural area. The complete 90-file command stays reproducible
# without adding its multi-minute memory_copy case to every push.
- name: wasm-core-2-structural-smoke
wasm_core2: true
home_tool: true
cmd: |
zig build wasm-spec-eval
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-2-structural --spec-root "$RUNNER_TEMP/wasm-core-2" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter imports.wast --inventory "$RUNNER_TEMP/wasm-core-2-imports.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-2-structural --spec-root "$RUNNER_TEMP/wasm-core-2" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter memory_init.wast --inventory "$RUNNER_TEMP/wasm-core-2-memory-init.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-2-structural --spec-root "$RUNNER_TEMP/wasm-core-2" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter ref_func.wast --inventory "$RUNNER_TEMP/wasm-core-2-ref-func.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-2-structural --spec-root "$RUNNER_TEMP/wasm-core-2" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter unreached-valid.wast --inventory "$RUNNER_TEMP/wasm-core-2-unreached-valid.json"
# Exact proposal/tool pins plus one bounded witness from each terminal
# SIMD execution family. The documented complete command owns all 56
# files and 25,976 commands without imposing that runtime on each push.
- name: wasm-simd-smoke
wasm_simd: true
home_tool: true
cmd: |
zig build wasm-spec-eval
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile simd --spec-root "$RUNNER_TEMP/wasm-simd" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter simd_i32x4_arith2.wast --inventory "$RUNNER_TEMP/wasm-simd-integer.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile simd --spec-root "$RUNNER_TEMP/wasm-simd" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter simd_f32x4_rounding.wast --inventory "$RUNNER_TEMP/wasm-simd-float.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile simd --spec-root "$RUNNER_TEMP/wasm-simd" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter simd_lane.wast --inventory "$RUNNER_TEMP/wasm-simd-lane.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile simd --spec-root "$RUNNER_TEMP/wasm-simd" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter simd_load.wast --inventory "$RUNNER_TEMP/wasm-simd-memory.json"
# Proposal script parsing stays unit-gated, while exact-pin runtime
# witnesses cover ordinary, recursively nested, and wait/notify
# thread directives without running the complete corpus on each push.
- name: wasm-threads-smoke
wasm_threads: true
home_tool: true
cmd: |
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --self-test
zig build wasm-spec-eval
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile threads --spec-root "$RUNNER_TEMP/wasm-threads" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter simple.wast --inventory "$RUNNER_TEMP/wasm-threads-simple.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile threads --spec-root "$RUNNER_TEMP/wasm-threads" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter deeply_nested.wast --inventory "$RUNNER_TEMP/wasm-threads-nested.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile threads --spec-root "$RUNNER_TEMP/wasm-threads" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter wait_notify.wast --inventory "$RUNNER_TEMP/wasm-threads-wait.json"
# Exact proposal pins and bounded runtime witnesses for every WABT
# post-MVP terminal profile. Complete inventories remain deliberate
# commands; CI covers control, exception, and multi-memory families.
- name: wasm-post-mvp-smoke
wasm_post_mvp: true
home_tool: true
cmd: |
zig build wasm-spec-eval
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile tail-calls --spec-root "$RUNNER_TEMP/wasm-tail-call" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter return_call.wast --inventory "$RUNNER_TEMP/wasm-tail-call-direct.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile tail-calls --spec-root "$RUNNER_TEMP/wasm-tail-call" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter return_call_indirect.wast --inventory "$RUNNER_TEMP/wasm-tail-call-indirect.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile exception-handling --spec-root "$RUNNER_TEMP/wasm-exception-handling" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter throw_ref.wast --inventory "$RUNNER_TEMP/wasm-exception-throw-ref.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile exception-handling --spec-root "$RUNNER_TEMP/wasm-exception-handling" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter try_table.wast --inventory "$RUNNER_TEMP/wasm-exception-try-table.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile multi-memory --spec-root "$RUNNER_TEMP/wasm-multi-memory" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter memory-multi.wast --inventory "$RUNNER_TEMP/wasm-multi-memory-core.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile multi-memory --spec-root "$RUNNER_TEMP/wasm-multi-memory" --wast2json "$RUNNER_TEMP/wabt-1.0.39/bin/wast2json" --filter linking3.wast --inventory "$RUNNER_TEMP/wasm-multi-memory-linking.json"
# wasm-tools-backed proposals use their exact release binary and
# source pins. These files cover Core 3 typed function calls,
# 64-bit memory/table execution, GC packed aggregates, i31
# references, and cast-branch control flow.
- name: wasm-core-3-memory64-gc-smoke
wasm_memory64_gc: true
home_tool: true
cmd: |
zig build wasm-spec-eval
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/call_ref.wast --inventory "$RUNNER_TEMP/wasm-core-3-call-ref.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/return_call_ref.wast --inventory "$RUNNER_TEMP/wasm-core-3-return-call-ref.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/exceptions/ --inventory "$RUNNER_TEMP/wasm-core-3-exceptions.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/ref_null.wast --inventory "$RUNNER_TEMP/wasm-core-3-ref-null.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/relaxed-simd/ --inventory "$RUNNER_TEMP/wasm-core-3-relaxed-simd.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/data.wast --inventory "$RUNNER_TEMP/wasm-core-3-data.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/global.wast --inventory "$RUNNER_TEMP/wasm-core-3-global.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/br_on_non_null.wast --inventory "$RUNNER_TEMP/wasm-core-3-br-on-non-null.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/ref.wast --inventory "$RUNNER_TEMP/wasm-core-3-ref.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/elem.wast --inventory "$RUNNER_TEMP/wasm-core-3-elem.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-3 --spec-root wasm-spec-wg3 --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter test/core/linking.wast --inventory "$RUNNER_TEMP/wasm-core-3-linking.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile core-main-shadow --spec-root "$RUNNER_TEMP/wasm-core-main-shadow" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --changed-only --filter test/core/binary-leb128.wast --inventory "$RUNNER_TEMP/wasm-core-main-shadow-binary-leb128.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile memory64 --spec-root "$RUNNER_TEMP/wasm-memory64" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter address64.wast --inventory "$RUNNER_TEMP/wasm-memory64-address.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile memory64 --spec-root "$RUNNER_TEMP/wasm-memory64" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter table_copy_mixed.wast --inventory "$RUNNER_TEMP/wasm-memory64-table.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile gc --spec-root "$RUNNER_TEMP/wasm-gc" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter array_copy.wast --inventory "$RUNNER_TEMP/wasm-gc-array.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile gc --spec-root "$RUNNER_TEMP/wasm-gc" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter i31.wast --inventory "$RUNNER_TEMP/wasm-gc-i31.json"
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-spec.ts --profile gc --spec-root "$RUNNER_TEMP/wasm-gc" --converter "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux/wasm-tools" --filter br_on_cast.wast --inventory "$RUNNER_TEMP/wasm-gc-casts.json"
# Keep the small production-module development roots from silently
# drifting while the sharded full root suite remains authoritative.
- name: focused-engine-tests
home_tool: true
cmd: |
zig build test-jit test-vm test-runtime test-concurrency gc-relocation-inventory-check optimizer-release-inventory-check
zig build test-runtime -Dtsan=true
# Execute real generated instructions and require both sides of W^X:
# unpublished pages fault on execute, and published pages fault on
# write. This Linux x86-64 leg exercises the POSIX backend directly.
- name: executable-memory-wx
cmd: |
zig build executable-memory-wx-test
zig build executable-memory-wx-test -Doptimize=ReleaseSafe
# The inventories are executable contracts: parser regressions,
# exported-but-uninventoried shims, stale statuses, and broken Home
# runtime linkage all fail this bounded leg.
- name: private-abi-boundary
home_tool: true
cmd: |
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/private-abi.ts --self-test
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/private-abi-tsan.ts
zig build c-api-audit home-private-abi-audit test-home-private-abi
zig build test-home-private-abi -Doptimize=ReleaseSafe
zig build test-home-private-abi -Dtsan=true
zig build test-private-consumer-providers
zig build test-private-consumer-providers -Doptimize=ReleaseSafe
zig build test-private-consumer-providers -Dtsan=true
zig build test-bun-private-sql-structure -Dprivate-abi-consumer=bun
zig build test-bun-private-sql-structure -Dprivate-abi-consumer=bun -Doptimize=ReleaseSafe
zig build test-bun-private-sql-structure -Dprivate-abi-consumer=bun -Dtsan=true
zig build test-private-global-lifecycle
zig build test-private-global-lifecycle -Doptimize=ReleaseSafe
zig build test-private-global-lifecycle -Dtsan=true
zig build test-private-process-initialization
zig build test-private-process-initialization -Doptimize=ReleaseSafe
zig build test-private-process-initialization -Dtsan=true
zig build test-bun-private-abort-signal -Dprivate-abi-consumer=bun
zig build test-bun-private-cached-bytecode -Dprivate-abi-consumer=bun
zig build test-bun-private-vm-lifecycle -Dprivate-abi-consumer=bun
zig build test-private-hot-reload
zig build test-private-process-signal
zig build test-home-private-script-execution-context
zig build test-private-module-registry-shims
zig build test-private-heap-snapshot
zig build test-private-heap-snapshot -Doptimize=ReleaseSafe
zig build test-private-heap-snapshot -Dtsan=true
zig build test-private-cpu-profile
zig build test-private-cpu-profile -Doptimize=ReleaseSafe
zig build test-private-cpu-profile -Dtsan=true
zig build test-private-readable-stream
zig build test-private-readable-stream -Doptimize=ReleaseSafe
zig build test-private-readable-stream -Dtsan=true
zig build test -Dtest-filter='Fetch Body'
zig build test -Dtest-filter='Fetch Body' -Doptimize=ReleaseSafe
zig build test -Dtest-filter='Fetch Body' -Dtsan=true
zig build test -Dtest-filter='streaming compilation'
zig build test -Dtest-filter='streaming compilation' -Doptimize=ReleaseSafe
zig build test -Dtest-filter='streaming compilation' -Dtsan=true
zig build test-private-wasm-streaming-compiler
zig build test-private-wasm-streaming-compiler -Doptimize=ReleaseSafe
zig build test-private-wasm-streaming-compiler -Dtsan=true
zig build test-private-error-code
zig build test-private-inspector-agents
zig build test-bun-private-property-iterator -Dprivate-abi-consumer=bun
zig build test-bun-private-c-api-extensions -Dprivate-abi-consumer=bun
zig build test-bun-private-array-buffer -Dprivate-abi-consumer=bun
zig build test-bun-private-dom-form-data -Dprivate-abi-consumer=bun
zig build test-bun-private-fetch-headers -Dprivate-abi-consumer=bun
zig build test-private-abi-mixed-profiles -Dprivate-abi-consumer=bun
- name: tsan-unit (shard 0/4)
cmd: zig build test -Dtsan=true -Dunit-shard-index=0 -Dunit-shard-count=4
- name: tsan-unit (shard 1/4)
cmd: zig build test -Dtsan=true -Dunit-shard-index=1 -Dunit-shard-count=4
- name: tsan-unit (shard 2/4)
cmd: zig build test -Dtsan=true -Dunit-shard-index=2 -Dunit-shard-count=4
- name: tsan-unit (shard 3/4)
cmd: zig build test -Dtsan=true -Dunit-shard-index=3 -Dunit-shard-count=4
- name: tsan-parallel-js
cmd: zig build test -Dtsan=true -Dtest-filter=parallel_js
# Concurrent-JS fuzzer: random programs sharing objects/arrays/closures/
# typed-arrays across JS Threads in GIL-free parallel contexts. Seeded,
# so it is a deterministic gate (no flake): a throw/UAF fails the leg.
# It found the call-dispatch + frame-slot-rooting bugs (commit b462c90).
- name: threadfuzz
cmd: zig build threadfuzz -Dfuzz-iters=400
# A smaller batch under ThreadSanitizer surfaces any unsynchronized
# engine access the seeded programs exercise (TSan is ~10× slower).
- name: tsan-threadfuzz
cmd: zig build threadfuzz -Dtsan=true -Dfuzz-iters=60
# Seed 107 is a deterministic ~3-minute amplified TSan workload, not
# a deadlock. Force its watchdog early here to prove cooperative VM
# termination joins every active Thread before the process succeeds;
# any secondary TSan leak or missed timeout fails this focused leg.
- name: tsan-threadfuzz-watchdog-cleanup
cmd: THREADFUZZ_SEED_TIMEOUT_MS=1000 THREADFUZZ_EXPECT_TIMEOUT=1 zig build threadfuzz -Dtsan=true -Dfuzz-amplify=true -Dfuzz-iters=1 -Dfuzz-seed=107
# Specialized TSan smoke for the mid-script-GC profile. The larger
# non-TSan leg owns breadth; this leg proves the hidden root/parked
# waiter/microtask paths are also free of unsuppressed engine races.
# TSan makes this 45-case profile exceed the default 120s per-seed
# watchdog on loaded runners, so keep the watchdog local to this leg.
- name: tsan-threadfuzz-midgc
cmd: THREADFUZZ_SEED_TIMEOUT_MS=300000 zig build threadfuzz -Dtsan=true -Dfuzz-midgc=true -Dfuzz-iters=2
# Specialized TSan smoke for lifecycle teardown. It keeps the Worker,
# asyncJoin, waitAsync, cleanup, and termination combinations under
# sanitizer instead of relying only on the default-profile TSan leg.
- name: tsan-threadfuzz-lifecycle
cmd: zig build threadfuzz -Dtsan=true -Dfuzz-lifecycle=true -Dfuzz-iters=2
# Stress amplification: the high-contention profile (6–14 threads,
# 5000-iter loops) drives rare interleavings far harder — a throw, UAF,
# hang, or torn read fails the leg. Run without TSan (its ~10× slowdown
# makes amplified contention impractical; the default-profile
# `tsan-threadfuzz` above covers race detection).
- name: threadfuzz-amplified
cmd: zig build threadfuzz -Dfuzz-amplify=true -Dfuzz-iters=30
# Breadth profile: cheaper than amplified, but deliberately covers
# caught exceptions/finally, nested thread lifecycle, asyncJoin,
# property wait/waitAsync, Condition wakeups, Thread.restrict, and
# FinalizationRegistry cleanup under GC-backed parallel contexts.
- name: threadfuzz-broad
cmd: zig build threadfuzz -Dfuzz-broad=true -Dfuzz-iters=80
# Mid-script GC wait-pump profile: blocks peers in property
# Atomics.wait, Condition.wait, and contended Lock acquisition while
# allocation pressure drives the experimental parallel collector. It
# also keeps ThreadLocal-only roots and completed-but-unjoined Thread
# results live across that pressure window.
# Each seed must complete exactly and finish at least one parallel sweep.
# Loaded GitHub runners can occasionally stretch this profile past the
# default 120s seed watchdog even when the focused seed replay is fast
# locally, so match the TSan mid-GC leg's per-seed hang window here.
- name: threadfuzz-midgc
cmd: THREADFUZZ_SEED_TIMEOUT_MS=300000 zig build threadfuzz -Dfuzz-midgc=true -Dfuzz-iters=20
# Lifecycle profile: deterministic termination storms (main throws
# with parked/unjoined Threads), cross-realm Worker + shared-realm
# Thread overlap on one SharedArrayBuffer with an exact counter oracle,
# Worker/thread/finalization scheduling on one retained SAB,
# Worker handler exception recovery, Thread.restrict lifecycle
# isolation, deterministic asyncHold barging, exact Worker FIFO
# close/terminate drain/drop ordering, and cross-thread
# finalization cleanup count/sum oracles including parked-waiter
# delivery and unregister-token suppression.
- name: threadfuzz-lifecycle
cmd: zig build threadfuzz -Dfuzz-lifecycle=true -Dfuzz-iters=60
# Sanitizer combo: ReleaseSafe keeps Zig's safety checks (UB, bounds,
# overflow, unreachable) on but under the optimizer, catching codegen-
# dependent faults the Debug build hides — a different bug class than TSan.
- name: releasesafe-threadfuzz
cmd: zig build threadfuzz -Doptimize=ReleaseSafe -Dfuzz-iters=400
# Deterministic-correctness oracle: each program's exact result is
# predicted and checked, so a wrong VALUE (lost/torn atomic update) fails
# the leg — a bug class the no-throw/no-race gates above can't see.
- name: threadfuzz-verify
cmd: zig build threadfuzz -Dfuzz-verify=true -Dfuzz-iters=300
steps:
# build.zig.zon uses local-path deps (`../zig-regex`, `../zig-gc`), so the
# sibling repos are checked out next to this one.
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
# The exact-parent benchmark harness validates HEAD, HEAD^1, and a
# non-parent HEAD~2 witness; retain precisely that ancestry in CI.
fetch-depth: 3
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
if: matrix.home_tool == true
with:
repository: home-lang/home
path: Home/lang
ref: d01469e9dd90e84cf9434b056390dcb4667b18bc
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: Build zig-js public C API for Home
if: matrix.home_tool == true
working-directory: zig-js
run: zig build home-tool-bootstrap
- name: Build pinned Home repository-tool runtime
if: matrix.home_tool == true
working-directory: Home/lang
run: zig build home-tool -Dtool-js-engine=zig-js -Dzig-js-root="$GITHUB_WORKSPACE/zig-js"
- name: Install pinned WebAssembly corpus tools
if: matrix.wasm_spec == true
working-directory: zig-js
run: |
git submodule update --init wasm-spec-wg1
curl --fail --location --silent --show-error \
https://github.com/WebAssembly/wabt/releases/download/1.0.12/wabt-1.0.12-linux.tar.gz \
--output "$RUNNER_TEMP/wabt-1.0.12-linux.tar.gz"
echo "540632382afd3e658761f2abb742e0504b4986ffcd127cef250fc843e46d9271 $RUNNER_TEMP/wabt-1.0.12-linux.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wabt-1.0.12-linux.tar.gz" --directory "$RUNNER_TEMP"
- name: Install pinned WebAssembly Core 2 corpus tools
if: matrix.wasm_core2 == true
working-directory: zig-js
run: |
git init "$RUNNER_TEMP/wasm-core-2"
git -C "$RUNNER_TEMP/wasm-core-2" remote add origin https://github.com/WebAssembly/spec.git
git -C "$RUNNER_TEMP/wasm-core-2" fetch --depth=1 origin fffc6e12fa454e475455a7b58d3b5dc343980c10
git -C "$RUNNER_TEMP/wasm-core-2" checkout --detach FETCH_HEAD
curl --fail --location --silent --show-error \
https://github.com/WebAssembly/wabt/releases/download/1.0.39/wabt-1.0.39-linux-x64.tar.gz \
--output "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz"
echo "1df1254b6639f5f1f89665907ee8cd0cd30114f40483515e583cccb86240840f $RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" --directory "$RUNNER_TEMP"
- name: Install pinned WebAssembly SIMD corpus tools
if: matrix.wasm_simd == true
working-directory: zig-js
run: |
git init "$RUNNER_TEMP/wasm-simd"
git -C "$RUNNER_TEMP/wasm-simd" remote add origin https://github.com/WebAssembly/simd.git
git -C "$RUNNER_TEMP/wasm-simd" fetch --depth=1 origin a78b98a6899c9e91a13095e560767af6e99d98fd
git -C "$RUNNER_TEMP/wasm-simd" checkout --detach FETCH_HEAD
curl --fail --location --silent --show-error \
https://github.com/WebAssembly/wabt/releases/download/1.0.39/wabt-1.0.39-linux-x64.tar.gz \
--output "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz"
echo "1df1254b6639f5f1f89665907ee8cd0cd30114f40483515e583cccb86240840f $RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" --directory "$RUNNER_TEMP"
- name: Install pinned WebAssembly Threads corpus tools
if: matrix.wasm_threads == true
working-directory: zig-js
run: |
git init "$RUNNER_TEMP/wasm-threads"
git -C "$RUNNER_TEMP/wasm-threads" remote add origin https://github.com/WebAssembly/threads.git
git -C "$RUNNER_TEMP/wasm-threads" fetch --depth=1 origin 979d0fcb994439423d63b2f0a8a7332d6285dd84
git -C "$RUNNER_TEMP/wasm-threads" checkout --detach FETCH_HEAD
curl --fail --location --silent --show-error \
https://github.com/WebAssembly/wabt/releases/download/1.0.39/wabt-1.0.39-linux-x64.tar.gz \
--output "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz"
echo "1df1254b6639f5f1f89665907ee8cd0cd30114f40483515e583cccb86240840f $RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" --directory "$RUNNER_TEMP"
- name: Install pinned post-MVP WABT corpora
if: matrix.wasm_post_mvp == true
working-directory: zig-js
run: |
git init "$RUNNER_TEMP/wasm-tail-call"
git -C "$RUNNER_TEMP/wasm-tail-call" remote add origin https://github.com/WebAssembly/tail-call.git
git -C "$RUNNER_TEMP/wasm-tail-call" fetch --depth=1 origin a6003d06aefef41e20a3e36fe2e500062555c895
git -C "$RUNNER_TEMP/wasm-tail-call" checkout --detach FETCH_HEAD
git init "$RUNNER_TEMP/wasm-exception-handling"
git -C "$RUNNER_TEMP/wasm-exception-handling" remote add origin https://github.com/WebAssembly/exception-handling.git
git -C "$RUNNER_TEMP/wasm-exception-handling" fetch --depth=1 origin af287a73d8f3bf7ea216c10592f9e350b947c4f2
git -C "$RUNNER_TEMP/wasm-exception-handling" checkout --detach FETCH_HEAD
git init "$RUNNER_TEMP/wasm-multi-memory"
git -C "$RUNNER_TEMP/wasm-multi-memory" remote add origin https://github.com/WebAssembly/multi-memory.git
git -C "$RUNNER_TEMP/wasm-multi-memory" fetch --depth=1 origin cf8b5aa27257311b8eac80ae83f4ba22ee308064
git -C "$RUNNER_TEMP/wasm-multi-memory" checkout --detach FETCH_HEAD
curl --fail --location --silent --show-error \
https://github.com/WebAssembly/wabt/releases/download/1.0.39/wabt-1.0.39-linux-x64.tar.gz \
--output "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz"
echo "1df1254b6639f5f1f89665907ee8cd0cd30114f40483515e583cccb86240840f $RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wabt-1.0.39-linux-x64.tar.gz" --directory "$RUNNER_TEMP"
- name: Install pinned Core 3, Memory64, and GC corpus tools
if: matrix.wasm_memory64_gc == true
working-directory: zig-js
run: |
git submodule update --init --depth 1 wasm-spec-wg3
test "$(git -C wasm-spec-wg3 rev-parse HEAD)" = 9d36019973201a19f9c9ebb0f10828b2fe2374aa
git init "$RUNNER_TEMP/wasm-core-main-shadow"
git -C "$RUNNER_TEMP/wasm-core-main-shadow" remote add origin https://github.com/WebAssembly/spec.git
git -C "$RUNNER_TEMP/wasm-core-main-shadow" fetch --depth=1 origin d7b37e4170d8315f2f1283aed4e8076591a9a333
git -C "$RUNNER_TEMP/wasm-core-main-shadow" checkout --detach FETCH_HEAD
git -C "$RUNNER_TEMP/wasm-core-main-shadow" fetch --depth=1 origin 9d36019973201a19f9c9ebb0f10828b2fe2374aa
test "$(git -C "$RUNNER_TEMP/wasm-core-main-shadow" rev-parse HEAD)" = d7b37e4170d8315f2f1283aed4e8076591a9a333
git init "$RUNNER_TEMP/wasm-memory64"
git -C "$RUNNER_TEMP/wasm-memory64" remote add origin https://github.com/WebAssembly/memory64.git
git -C "$RUNNER_TEMP/wasm-memory64" fetch --depth=1 origin 9003cd5e24e53b84cd9027ea3dd7ae57159a6db1
git -C "$RUNNER_TEMP/wasm-memory64" checkout --detach FETCH_HEAD
git init "$RUNNER_TEMP/wasm-gc"
git -C "$RUNNER_TEMP/wasm-gc" remote add origin https://github.com/WebAssembly/gc.git
git -C "$RUNNER_TEMP/wasm-gc" fetch --depth=1 origin 756060f5816c7e2159f4817fbdee76cf52f9c923
git -C "$RUNNER_TEMP/wasm-gc" checkout --detach FETCH_HEAD
curl --fail --location --silent --show-error \
https://github.com/bytecodealliance/wasm-tools/releases/download/v1.253.0/wasm-tools-1.253.0-x86_64-linux.tar.gz \
--output "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux.tar.gz"
echo "4e2898f7ca3bd0536218ed9b7b36ff7b86954c57ae0e6272fde69728cbe01088 $RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux.tar.gz" | sha256sum --check
tar --extract --gzip --file "$RUNNER_TEMP/wasm-tools-1.253.0-x86_64-linux.tar.gz" --directory "$RUNNER_TEMP"
- name: Report non-blocking Core 3 upstream drift
if: matrix.wasm_memory64_gc == true
continue-on-error: true
working-directory: zig-js
run: |
git -C wasm-spec-wg3 fetch --depth=1 origin main:refs/remotes/origin/main refs/tags/wg-3.0:refs/tags/wg-3.0
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/wasm-core3-drift.ts --upstream-ref origin/main --output "$RUNNER_TEMP/wasm-core-3-upstream-drift.json"
- name: ${{ matrix.name }}
working-directory: zig-js
env:
HOME_TOOL: ${{ github.workspace }}/Home/lang/zig-out/bin/home-tool
run: ${{ matrix.cmd }}
# Whole-corpus no-GIL ThreadSanitizer sweep — the issue #1 GIL-drop gate
# (drive the no-GIL corpus to zero unsuppressed races, then the GIL can flip
# off as the default). Runs EVERY allowlist case under `parallel_js` + TSan,
# each in its OWN process: per-case isolation sidesteps the cumulative-load OOM
# of a single all-in-one-process TSan run (TSan shadow memory grows across the
# whole allowlist). Sharded 4 ways so the ~5h serial sweep fits the
# runner time limit. Both *named* no-GIL frontier races are now closed — the
# api/blocking-gate settlement race (re-derived its GIL-specific assertion) and
# the semantics-batch StringHashMap-grow panic (accessor-snapshot in seal/freeze
# + locked getAccessor in property-mode Atomics) — so this sweep hunts any
# remaining *un-named* residual. continue-on-error while still being driven to
# zero: a TSan report names the next fix.
tsan-nogil-corpus:
name: tsan-nogil-corpus (shard ${{ matrix.shard }}/4)
# Gates every PR + main push (production no-GIL safety), plus nightly. Now at
# zero engine-state races, so it hard-blocks: a TSan report fails the run.
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: Build the TSan-instrumented threads-test binary
working-directory: zig-js
run: zig build threads-test-bin -Dtsan=true
- name: Sweep shard under parallel_js + TSan
working-directory: zig-js
run: |
set -uo pipefail
# Halt each case at its first race so the report is the case-log tail.
# The engine currently keeps even JS program-byte paths TSan-clean via
# locks/atomics, so the production corpus runs with no suppressions.
export TSAN_OPTIONS="halt_on_error=1"
BIN=./zig-out/bin/threads-test
# This shard's slice of the allowlist (NR % 4 == shard), each case run
# in its own process. `timeout` caps a heavy stress case (the GC/CAS
# storms run minutes under TSan's ~10x slowdown) so a shard can't hang.
# `list` prints to stderr (the harness's only output stream), so 2>&1.
"$BIN" list 2>&1 | awk -v S=${{ matrix.shard }} 'NR % 4 == S' > shard.txt
echo "shard ${{ matrix.shard }}: $(wc -l < shard.txt) cases"
races=0; fails=0; passes=0; n=0
while IFS= read -r c; do
[ -z "$c" ] && continue
n=$((n+1))
if timeout 600 "$BIN" parallel-js one "$c" > case.log 2>&1; then
passes=$((passes+1))
elif grep -q "ThreadSanitizer:" case.log; then
races=$((races+1)); echo "::error::TSan race in $c"; echo "----- $c -----"; cat case.log
else
fails=$((fails+1)); echo "::warning::non-race failure/timeout in $c"; tail -8 case.log
fi
done < shard.txt
echo "=== shard ${{ matrix.shard }} done: pass=$passes fail=$fails race=$races (n=$n) ==="
# The gate is races==0; surface a race as a leg failure (non-race
# functional fails/timeouts under TSan slowness do not fail the gate).
[ "$races" -eq 0 ]
nogil-corpus-functional:
name: nogil-corpus-functional (shard ${{ matrix.shard }}/4)
# The TSan sweep above gates races only: under its ~10x slowdown a
# functional failure or timeout is unreliable, so those are warnings there.
# This leg supplies the functional signal instead — no TSan, so timings mean
# something — and diffs each case against the published no-GIL inventory. A
# case the baseline records as passing that stops passing fails the build.
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: home-lang/home
path: Home/lang
ref: d01469e9dd90e84cf9434b056390dcb4667b18bc
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: Build the threads-test binary
working-directory: zig-js
run: zig build threads-test-bin
- name: Build zig-js public C API for Home
working-directory: zig-js
run: zig build home-tool-bootstrap
- name: Build Home repository-tool runtime
working-directory: Home/lang
run: zig build home-tool -Dtool-js-engine=zig-js -Dzig-js-root="$GITHUB_WORKSPACE/zig-js"
- name: Gate this shard against the published no-GIL baseline
working-directory: zig-js
run: |
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/nogil-corpus-gate.ts --shard ${{ matrix.shard }} --shards 4 --deadline 600 --build-mode debug
nogil-corpus-releasesafe:
name: nogil-corpus-releasesafe (shard ${{ matrix.shard }}/4)
# Same corpus and same gate as nogil-corpus-functional, built ReleaseSafe.
#
# That leg runs at the default Debug, where the allocator captures a stack
# trace per allocation; measured on cve/mc-val-fire-vs-link.js the same case
# is 32.3 s Debug against 3.3 s ReleaseSafe. Debug is kept because its
# allocator is what catches use-after-free on a corpus that exists partly to
# find memory bugs. This leg exists because a ~10x cost multiplier decides
# whether a case fits the deadline at all, so a case can be genuinely
# correct and still be ungateable in Debug alone.
#
# Both legs must be green. This one is the throughput signal; the Debug leg
# remains the memory-safety one.
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: home-lang/home
path: Home/lang
ref: d01469e9dd90e84cf9434b056390dcb4667b18bc
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: Build the threads-test binary (ReleaseSafe)
working-directory: zig-js
run: zig build threads-test-bin -Doptimize=ReleaseSafe
- name: Build zig-js public C API for Home
working-directory: zig-js
run: zig build home-tool-bootstrap
- name: Build Home repository-tool runtime
working-directory: Home/lang
run: zig build home-tool -Dtool-js-engine=zig-js -Dzig-js-root="$GITHUB_WORKSPACE/zig-js"
- name: Gate this shard against the published no-GIL baseline
working-directory: zig-js
run: |
"$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool" run tools/nogil-corpus-gate.ts --shard ${{ matrix.shard }} --shards 4 --deadline 600 --build-mode releasesafe
nightly-threadfuzz-tsan:
name: nightly-threadfuzz-tsan (${{ matrix.name }})
# Higher-iteration sanitizer expansion for issue #1's remaining roadmap.
# PRs/main pushes run the fast TSan smoke legs above; nightly/manual runs
# spend more time on the same default, mid-GC, and lifecycle profiles.
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: default
profile: default
- name: midgc
profile: midgc
- name: lifecycle
profile: lifecycle
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: ${{ matrix.name }}
working-directory: zig-js
env:
DEFAULT_ITERS: ${{ github.event.inputs.nightly_tsan_default_iters || '120' }}
MIDGC_ITERS: ${{ github.event.inputs.nightly_tsan_midgc_iters || '5' }}
LIFECYCLE_ITERS: ${{ github.event.inputs.nightly_tsan_lifecycle_iters || '5' }}
run: |
case "${{ matrix.profile }}" in
default)
zig build threadfuzz -Dtsan=true -Dfuzz-iters="${DEFAULT_ITERS}"
;;
midgc)
THREADFUZZ_SEED_TIMEOUT_MS=300000 zig build threadfuzz -Dtsan=true -Dfuzz-midgc=true -Dfuzz-iters="${MIDGC_ITERS}"
;;
lifecycle)
zig build threadfuzz -Dtsan=true -Dfuzz-lifecycle=true -Dfuzz-iters="${LIFECYCLE_ITERS}"
;;
esac
# Runs a curated test262 cross-section in GIL-free parallel contexts and asserts
# it introduces no NEW failures vs the baseline (arena) engine — i.e. the
# parallel-mode locked paths + GC-managed allocator are correct across a broad
# slice of the language, not just the threads corpus. (The full corpus is too
# slow per-context under GC for CI; this is the representative gate.)
test262-parallel:
name: test262-parallel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: zig-js
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
packages: zig@0.17.0-dev
- name: Parallel test262 introduces no new failures
working-directory: zig-js
run: |
set -uo pipefail
SUBS="test/language/types/boolean test/language/types/number test/language/statements/class/subclass-builtins test/built-ins/Object/keys test/built-ins/Map/prototype/set"
zig build test262-bin >/dev/null
BASE=./zig-out/bin/test262
fails_base=0
for s in $SUBS; do
f=$("$BASE" --diag "$s" 2>&1 | grep -oE '[0-9]+ fail' | grep -oE '[0-9]+' | head -1 || echo 0)
fails_base=$((fails_base + ${f:-0}))
done
echo "baseline (arena) total fails: $fails_base"
zig build test262-bin -Dtest262-parallel-js=true >/dev/null
PAR=./zig-out/bin/test262
fails_par=0
for s in $SUBS; do
line=$("$PAR" --diag "$s" 2>&1 | tail -1); echo "$line"
f=$(echo "$line" | grep -oE '[0-9]+ fail' | grep -oE '[0-9]+' | head -1 || echo 0)
fails_par=$((fails_par + ${f:-0}))
done
echo "parallel total fails: $fails_par (baseline: $fails_base)"
if [ "$fails_par" -gt "$fails_base" ]; then
echo "::error::parallel mode introduced $((fails_par - fails_base)) new test262 failures"; exit 1
fi
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: Libraries/zig-js
# `docs-link-check` is a Zig build step, so configuration resolves the
# same owned local-path package graph as every other repository target.
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-regex
path: Libraries/zig-regex
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: zig-utils/zig-gc
path: Libraries/zig-gc
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: stacksjs/bunpress
path: Tools/bunpress
ref: 1262895355142cb57ae7850dec7bf31cc5f5999d
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: stacksjs/stx
path: Tools/stx
ref: c215f1b82bdb40b983cf54f0182c7d959587f31d
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
repository: stacksjs/ts-syntax-highlighter
path: Libraries/ts-syntax-highlighter
ref: 38ea140aa4b5c404f5b4e8450a04eb8195293271
- uses: pantry-pm/pantry/packages/action@4ad0cc7b728ba6dc295fcccf9b88240f9fe610c9
with:
version: 0.11.12
packages: bun.sh@1.3.14
install: 'false'
- name: Prepare owned documentation source graph
working-directory: Tools/bunpress
run: bun run deps:owned
# bunpress renders whatever it is given, so a link to a page that no
# longer exists builds cleanly. This catches that, plus sidebar entries
# pointing at renamed files.
- name: docs link check
working-directory: Libraries/zig-js
run: zig build docs-link-check
- name: docs:build
working-directory: Libraries/zig-js
run: bun run docs:build