mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-12-02 20:22:35 -05:00
ci: only main saves the Rust caches; line-table debug info in dev (#1109)
PR runs saved their own Rust caches (up to 1.2 GB per OS, 7.1 GB in all), which only the PR can read. With the repository over its 10 GB limit they evicted main's, so Windows legs often found no cache and compiled every dependency (13 min test build). Only main saves now. The dev profile drops dependency debug info and keeps line tables for workspace crates, as the other craft apps do, which shortens Windows links and shrinks the cache. The cache prefix moves to v1 because rust-cache never resaves an existing key. Co-authored-by: FredApps <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2 files changed
+14
No files matched your search
@@ -42,7 +42,14 @@ jobs:
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
|
||||
# Only main saves; pull requests restore main's cache. A PR's own cache (up to 1.2 GB per OS)
|
||||
# is visible to that PR alone, and with the repository at its 10 GB limit the PR caches
|
||||
# evicted main's: Windows legs then found no cache and compiled every dependency.
|
||||
# v1: the dev profile dropped dependency debug info, and an existing key is never resaved.
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
prefix-key: v1-rust
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Format
|
||||
if: runner.os == 'Linux'
|
||||
@@ -67,7 +74,9 @@ jobs:
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
prefix-key: v1-rust
|
||||
key: wasm32
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Check wasm-safe crates
|
||||
run: cargo xtask wasm
|
||||
- name: Clippy (wasm32)
|
||||
|
||||
@@ -38,9 +38,14 @@ craft-ui = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs"
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
debug = false
|
||||
|
||||
# Line tables keep file:line in panic backtraces but drop variable info, as in the other craft
|
||||
# apps: full debug info made Windows test links slow and the CI cache large. To inspect locals in
|
||||
# a debugger, build with CARGO_PROFILE_DEV_DEBUG=true.
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
debug = "line-tables-only"
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
|
||||
Reference in new issue
Block a user