[backport] Cache Deno development cache in CI#14452
Merged
Conversation
* Gate vendor.sh cache wipe behind QUARTO_SKIP_DENO_CACHE_WIPE Default behavior unchanged: local ./configure.sh still wipes deno_cache before re-vendoring. CI opts into cache preservation by setting QUARTO_SKIP_DENO_CACHE_WIPE=1, enabling actions/cache to restore the cache and have it survive vendor.sh. * Gate vendor.cmd cache wipe behind QUARTO_SKIP_DENO_CACHE_WIPE Windows counterpart to the vendor.sh change. Behavior matches: default wipes, QUARTO_SKIP_DENO_CACHE_WIPE=1 preserves. * Cache Deno development cache in CI Adds actions/cache restore for ./package/dist/bin/deno_cache, keyed on the five files that influence Deno dep resolution: configuration, src/import_map.json, src/vendor_deps.ts, tests/test-deps.ts, and package/scripts/deno_std/deno_std.ts. Both configure steps set QUARTO_SKIP_DENO_CACHE_WIPE=1 so the restored cache survives the configure.sh / configure.cmd run. Adds dev-docs/ci-deno-caching.md explaining the cache layout, key composition, env var contract, and how to force invalidation. Adds a cross-link from dev-docs/upgrade-dependencies.md so a contributor bumping deno_std version sees the cache consequences. Expected per-OS cache size ~150-200 MB; total footprint ~600 MB across Linux/macOS/Windows, well under GitHub's 10 GB repo quota. (cherry picked from commit e4b75c1)
The CI Deno dev cache (Cache Deno development cache step in .github/workflows/actions/quarto-dev/action.yml) restores package/dist/bin/deno_cache before configure runs. configure.sh and configure.cmd then unconditionally wipe package/dist when bootstrapping Deno, destroying the just-restored cache before vendor.sh reaches it. The vendor scripts already gate their own cache wipe with QUARTO_SKIP_DENO_CACHE_WIPE=1; the configure-time wipe was missed. Apply the same gate to configure.sh and configure.cmd so the restored cache survives. Local devs (env var unset) keep the original wipe behavior. (cherry picked from commit 3e11b83)
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.
Important
Backport from #14408 and #14450.
Brings the Deno dev-cache CI step (#14408) and the configure-time wipe gate that makes it work (#14450). The two changes have to land together — without #14450, the cache is restored then immediately wiped by
configure.{sh,cmd}before vendor scripts can use it.Cargo/typst-gather cache step preserved on this branch since v1.9 still ships typst-gather as an in-tree Rust crate.