Cache subdirectory target dirs in Wasm CI jobs#5439
Merged
Conversation
ma2bd
approved these changes
Feb 16, 2026
Collaborator
|
looks okay to me too |
ndr-ds
added a commit
that referenced
this pull request
Feb 17, 2026
## Motivation Fix #5433. The CI jobs `wasm-application-test` and `linera-sdk-tests-fixtures` are extremely slow (~13 min and ~6 min respectively), even on subsequent runs, because their subdirectory `target/` directories are not cached between CI runs. The root cause is that `actions-rust-lang/setup-rust-toolchain@v1` uses `Swatinem/rust-cache` under the hood, which [defaults to caching only `./target/`](https://github.com/Swatinem/rust-cache/blob/master/README.md). Since these jobs build in `examples/` and `linera-sdk/tests/fixtures/`, their `target/` directories are never persisted. ## Proposal Add the `cache-workspaces` parameter to the `setup-rust-toolchain` action in both jobs, pointing to the correct subdirectory target dirs: - `wasm-application-test`: `examples -> target` - `linera-sdk-tests-fixtures`: `linera-sdk/tests/fixtures -> target` ## Test Plan - The first CI run after merging will still be slow (cold cache). - The second run on the same branch showed around a 25% improvement, it seems ## Release Plan - Nothing to do / These changes follow the usual release cycle.
ndr-ds
added a commit
that referenced
this pull request
Feb 17, 2026
## Motivation Fix #5433. The CI jobs `wasm-application-test` and `linera-sdk-tests-fixtures` are extremely slow (~13 min and ~6 min respectively), even on subsequent runs, because their subdirectory `target/` directories are not cached between CI runs. The root cause is that `actions-rust-lang/setup-rust-toolchain@v1` uses `Swatinem/rust-cache` under the hood, which [defaults to caching only `./target/`](https://github.com/Swatinem/rust-cache/blob/master/README.md). Since these jobs build in `examples/` and `linera-sdk/tests/fixtures/`, their `target/` directories are never persisted. ## Proposal Add the `cache-workspaces` parameter to the `setup-rust-toolchain` action in both jobs, pointing to the correct subdirectory target dirs: - `wasm-application-test`: `examples -> target` - `linera-sdk-tests-fixtures`: `linera-sdk/tests/fixtures -> target` ## Test Plan - The first CI run after merging will still be slow (cold cache). - The second run on the same branch showed around a 25% improvement, it seems ## Release Plan - Nothing to do / These changes follow the usual release cycle.
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.

Motivation
Fix #5433. The CI jobs
wasm-application-testandlinera-sdk-tests-fixturesare extremely slow (~13 min and ~6 min respectively), even on subsequent runs, because their subdirectorytarget/directories are not cached between CI runs.The root cause is that
actions-rust-lang/setup-rust-toolchain@v1usesSwatinem/rust-cacheunder the hood, which defaults to caching only./target/. Since these jobs build inexamples/andlinera-sdk/tests/fixtures/, theirtarget/directories are never persisted.Proposal
Add the
cache-workspacesparameter to thesetup-rust-toolchainaction in both jobs, pointing to the correctsubdirectory target dirs:
wasm-application-test:examples -> targetlinera-sdk-tests-fixtures:linera-sdk/tests/fixtures -> targetTest Plan
Release Plan