Skip to content

ci: pin wasm-pack and cache the Pages build - #74

Merged
simontreanor merged 1 commit into
mainfrom
ci/pages-pins
Aug 2, 2026
Merged

ci: pin wasm-pack and cache the Pages build#74
simontreanor merged 1 commit into
mainfrom
ci/pages-pins

Conversation

@simontreanor

Copy link
Copy Markdown
Owner

Split out of #67, which is otherwise merged. This is the workflow half, and it is separate because merging a change to .github/workflows/** needs the workflow token scope that the gh CLI in my session does not carry (gist, read:org, repo).

You will need to merge this one yourself, either through the web UI or after running gh auth refresh -s workflow.

What it changes

The Pages workflow installed wasm-pack through the upstream installer script:

run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

That takes whatever version is newest on the day the job runs. It was the only unpinned tool in a pipeline that otherwise pins its Rust toolchain (1.97.0, matching rust-toolchain.toml) and its mdBook (v0.5.4), so a wasm-pack release could change a deploy with nothing in the repo having changed. Now pinned to 0.15.0, the version the local playground builds use, installed from the release tarball the same way mdBook already is.

The job also had no cargo cache, so every deploy recompiled the whole compiler for wasm32-unknown-unknown from scratch.

Verification

The tarball layout and the --strip-components=1 extraction were checked against the real release artifact, and the resulting file is chmod +x'd because the archive mode does not survive every extraction path. pages.yml parses as valid YAML. The proof that matters is the next deploy: this workflow only runs on a push to main.

The Pages workflow installed wasm-pack through the upstream installer script,
which takes whatever version is newest that day. It was the one unpinned tool
in a pipeline that pins its Rust toolchain and its mdBook, so a wasm-pack
release could change a deploy without anything in the repo changing. Pinned to
0.15.0, the version the local builds use.

The job also had no cargo cache, so every deploy recompiled the whole compiler
for wasm32 from scratch.

Split out of #67 because merging a workflow change needs a token scope the CLI
here does not carry.
@simontreanor
simontreanor merged commit 27edeea into main Aug 2, 2026
16 checks passed
@simontreanor
simontreanor deleted the ci/pages-pins branch August 2, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant