ci: pin wasm-pack and cache the Pages build - #74
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theworkflowtoken scope that theghCLI 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:
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, matchingrust-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-unknownfrom scratch.Verification
The tarball layout and the
--strip-components=1extraction were checked against the real release artifact, and the resulting file ischmod +x'd because the archive mode does not survive every extraction path.pages.ymlparses as valid YAML. The proof that matters is the next deploy: this workflow only runs on a push tomain.