Skip to content

[backport] Cache Deno development cache in CI#14452

Merged
cderv merged 2 commits intov1.9from
backport/deno-cache-ci-fix
Apr 28, 2026
Merged

[backport] Cache Deno development cache in CI#14452
cderv merged 2 commits intov1.9from
backport/deno-cache-ci-fix

Conversation

@cderv
Copy link
Copy Markdown
Member

@cderv cderv commented Apr 28, 2026

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.

cderv added 2 commits April 28, 2026 16:50
* 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)
@cderv cderv merged commit a8748c3 into v1.9 Apr 28, 2026
44 checks passed
@cderv cderv deleted the backport/deno-cache-ci-fix branch April 28, 2026 16:37
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