ci: improve wasm build caching#175
Conversation
There was a problem hiding this comment.
Pull request overview
This PR overhauls Rust toolchain handling and CI caching: it pins the nightly toolchain in rust-toolchain.toml, introduces shared composite actions for Rust toolchain installation and sccache setup, routes Rust/CMake/WASM jobs through them, and adds a final-artifact cache for playground/public/wasm that lets docs builds short-circuit Rust/Emscripten/WASM steps on a cache hit. It also drops the now-unused qihe submodule entry and removes submodules: recursive from all checkouts.
Changes:
- Pin nightly to
nightly-2026-05-24and add.github/actions/setup-rust+.github/actions/setup-sccache; wire them intoci.yml,release.yml,docs-preview.yml,deploy-docs.yml, and updatebuild-vide-wasm.mjsandcrates/slang/bindings/rust/build.rs(opt-in CMake compiler launcher) accordingly. - Add source-aware
rust-cachekeys and aplayground/public/wasmrestore/verify/save cache pattern in both docs workflows that gates Rust/sccache/rust-cache/Emscripten/build steps on cache miss. - Remove the
qihesubmodule entry andsubmodules: recursivefrom all checkout steps, and remove the now-redundantsafe.directoryentry forcrates/slangin Alpine jobs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain.toml | Pins nightly date and adds clippy/rustfmt components with minimal profile. |
| .github/actions/setup-rust/action.yml | New composite action parsing rust-toolchain.toml and installing via dtolnay/rust-toolchain@master. |
| .github/actions/setup-sccache/action.yml | New composite action installing sccache and exporting env vars (incl. optional VIDE_USE_SCCACHE_CMAKE). |
| .github/workflows/ci.yml | Adds path filters, routes through new actions, drops submodules/safe-directory, adds source-aware cache keys. |
| .github/workflows/release.yml | Same migration to shared actions, adds matrix rust-target and source-aware cache keys for packagers. |
| .github/workflows/docs-preview.yml | Broadens triggers and adds final-WASM restore/verify/save with skip conditions on cache hit. |
| .github/workflows/deploy-docs.yml | Mirrors the docs-preview WASM caching and skip logic for production docs. |
| crates/slang/bindings/rust/build.rs | Opt-in CMake *_COMPILER_LAUNCHER definitions gated on VIDE_USE_SCCACHE_CMAKE. |
| playground/scripts/build-vide-wasm.mjs | Drops explicit rustup/--toolchain nightly invocations now that the toolchain file pins the version. |
| .gitmodules | Removes the unused qihe submodule entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Docs preview: https://vide.pascal-lab.net/preview/pr-175/ |
Summary
Validation