Speed up the deploy workflow - #44
Merged
Merged
Conversation
The `Install` step was ~134s every run because Yarn re-cloned and re-ran `comline-simulator`'s `prepack` (a full Rust → wasm build). Yarn Berry's global cache (`~/.yarn/berry/cache`) already holds the *built* archive, so caching that folder lets `yarn install` skip the build unless `app/yarn.lock` changes (a sim bump) — ~134s → ~10s on a hit. Also: drop `rustup update stable` (the runner's is current), add `restore-keys` to the cargo cache, scope `concurrency` per-ref so PR runs stop cancelling each other, and skip the Pages artifact upload on PRs.
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.
Step timings from a recent run:
yarn install)Install— 134s → ~10sYarn re-cloned
comline-simulatorand re-ran itsprepack(a full Rust →wasm-bindgen→wasm-optbuild, lean + scripted) on every run. YarnBerry's global cache (
~/.yarn/berry/cache) already stores the builtarchive, so caching that folder makes
yarn installrestore it and skipthe build. It only re-runs when
app/yarn.lockchanges — i.e. when we bumpthe sim SHA.
Smaller
rustup update stable && rustup default stable→ justrustup target add wasm32-unknown-unknown(the runner's stable iscurrent). ~9s.
restore-keyson the cargo cache so a near-miss still helps.concurrency.groupis now per-ref — a push to any branch was cancellingevery other run (hence the string of "cancelled" runs lately).
upload-pages-artifacton PRs (onlydeployuses it, anddeployalready skips PRs).
First run after merge still populates the yarn cache; subsequent PRs should
land around ~1.5–2 min, with
Build editor WASMthen the long pole(
Swatinem/rust-cachefor thewasm/crate is a possible follow-up).