7373 railgun-static :
7474 name : railgun adapter (fmt + check + clippy)
7575 runs-on : ubuntu-latest
76- # fmt + cargo check + clippy land in ~5-8 min on the 2-vCPU runner
77- # because they skip codegen + link. Cap at 30 min so a hung tool
78- # surfaces fast instead of blocking the matrix.
76+ # cap so a hung tool surfaces instead of blocking the matrix
7977 timeout-minutes : 30
8078 steps :
8179 - uses : actions/checkout@v4
@@ -107,26 +105,8 @@ jobs:
107105 run : cargo clippy --manifest-path adapters/railgun/Cargo.toml --workspace --all-targets -- -D warnings
108106
109107 railgun-tests :
110- # Test execution is the wall-time floor of CI: the 9-crate adapter +
111- # raven-inspire submodule build, under `release`, took ~48 min on a
112- # 2-vCPU runner. Four stacked optimisations bring it under ~20 min:
113- #
114- # 1. `[profile.ci-test]` in adapters/railgun/Cargo.toml
115- # (lto=off, codegen-units=16, opt-level=2) — saturates both
116- # cores during codegen and drops the ~120-binary thin-LTO link
117- # pass.
118- # 2. lld linker via RUSTFLAGS — parallel symbol resolution, ~25%
119- # off the link phase vs the default bfd ld.
120- # 3. sccache w/ GHA-cache backend — caches individual rustc
121- # invocations across runs. Cold = no win; warm = ~70-80% hit
122- # on the inspire dep closure (the dominant cost).
123- # 4. Matrix split — three parallel runners by package group.
124- # Wall time = max(shard), not sum.
125- #
126- # Each shard groups packages so the per-shard test count is roughly
127- # balanced (engine=45, cli=23, rest=40 integration-test files).
128- # `fail-fast: false` lets a single shard fail without cancelling the
129- # others, which speeds debugging.
108+ # split into three balanced shards (ci-test profile + lld + sccache)
109+ # to keep the adapter + inspire test build under the time budget
130110 name : railgun tests (${{ matrix.shard.name }})
131111 needs : railgun-static
132112 runs-on : ubuntu-latest
@@ -149,24 +129,13 @@ jobs:
149129 -p raven-railgun-ppoi-mirror
150130 -p raven-railgun-core
151131 env :
152- # sccache: official Mozilla wrapper. GHA backend ships with the
153- # action; `SCCACHE_GHA_ENABLED=true` is consumed by the action
154- # itself. Setting RUSTC_WRAPPER here makes cargo route every rustc
155- # invocation through sccache for the rest of the job.
156132 RUSTC_WRAPPER : sccache
157133 SCCACHE_GHA_ENABLED : " true"
158- # lld linker. `.cargo/config.toml` carries the same flag for local
159- # dev; setting it via RUSTFLAGS overrides any nested config that
160- # would re-pin the default ld. -D warnings is preserved from the
161- # workflow-level env to keep build-time lint posture identical.
134+ # re-declare -D warnings since RUSTFLAGS overrides the workflow-level env
162135 RUSTFLAGS : " -D warnings -C link-arg=-fuse-ld=lld"
163136 steps :
164137 - name : free disk space
165- # The adapter workspace's target/ tree (10 inner crates, full
166- # test build with --all-targets) exceeds the runner's default
167- # ~14 GiB free budget. Strip pre-installed tooling that the
168- # Rust build path does not touch (CodeQL, Android SDK, .NET,
169- # Haskell, Docker pre-pulls) to free ~30 GiB.
138+ # adapter target/ tree overruns the runner's default free budget
170139 run : |
171140 sudo rm -rf /usr/share/dotnet
172141 sudo rm -rf /usr/local/lib/android
@@ -182,33 +151,14 @@ jobs:
182151 - name : install lld linker
183152 run : sudo apt-get update && sudo apt-get install -y lld
184153 - name : install sccache
185- # v0.0.10 ships sccache 0.10+ which uses the GHA cache service
186- # v2 endpoint. v0.0.6 still pinned sccache 0.8.x against the
187- # decommissioned classic /artifactcache endpoint and 400'd on
188- # every run.
154+ # v0.0.10 ships sccache 0.10+ for the GHA cache v2 endpoint
189155 uses : mozilla-actions/sccache-action@v0.0.10
190156 - uses : Swatinem/rust-cache@v2
191157 with :
192- # Shared cache across all three matrix shards so the second
193- # and third shards reuse the first shard's saved target/ tree.
194- # Without this, each shard would rebuild raven-inspire cold.
158+ # shared so shards reuse the first shard's target/ instead of rebuilding inspire cold
195159 shared-key : " railgun-tests"
196160 - uses : taiki-e/install-action@nextest
197161 - name : cargo nextest (ci-test profile)
198- # `ci-test` profile (see adapters/railgun/Cargo.toml): inherits
199- # release semantics for runtime perf (so the InsPIRe respond
200- # path stays under nextest's 120s slow-test ceiling) but with
201- # lto=off + codegen-units=16 for compile parallelism.
202- #
203- # `--profile ci` selects the nextest profile in
204- # adapters/railgun/.config/nextest.toml: retries=0, JSON-only
205- # failure output, 120s slow-timeout × 3 strikes, test-groups
206- # serialising chaos-child / flock / arcswap stress tests.
207- #
208- # Doc-tests skipped: the adapter workspace has zero `///`
209- # Rust doctests today; `cargo test --doc` would re-build every
210- # dep from scratch for no coverage. Re-add the step if a real
211- # doctest lands later.
212162 run : |
213163 cargo nextest run \
214164 --manifest-path adapters/railgun/Cargo.toml \
@@ -217,10 +167,6 @@ jobs:
217167 --cargo-profile ci-test \
218168 --profile ci
219169 - name : sccache stats
220- # Surface cache-hit rate so we can tell whether the warm-run
221- # speedup is materialising. First run will show ~0% hit; second
222- # run on the same branch should show >50% hit on the inspire
223- # dep closure.
224170 run : sccache --show-stats
225171 if : always()
226172
@@ -269,14 +215,8 @@ jobs:
269215 run : cargo check --manifest-path crates/binary-fuse-filter/Cargo.toml --target wasm32-unknown-unknown
270216
271217 sdk-tests :
272- # Fresh-clone-build gate: the TypeScript SDK at adapters/railgun/sdk
273- # depends on the wasm-pack output of raven-inspire-client-wasm
274- # (gitignored). A fresh clone must:
275- # 1. Build the wasm-pack pkg-node + pkg-bundler outputs.
276- # 2. Stay under the 500 KB gzipped bundle ceiling
277- # (adapters/railgun/scripts/check-wasm-bundle-size.sh).
278- # 3. `pnpm install` resolve cleanly against pnpm-lock.yaml.
279- # 4. `pnpm test` pass against the freshly built pkg-node.
218+ # fresh-clone gate: SDK depends on the gitignored wasm-pack output,
219+ # so this rebuilds it, enforces the bundle ceiling, then runs tests
280220 name : sdk tests (typescript + wasm-pack)
281221 runs-on : ubuntu-latest
282222 steps :
0 commit comments