Skip to content

Cache subdirectory target dirs in Wasm CI jobs#5439

Merged
ndr-ds merged 1 commit intomainfrom
ndr-ds/cache_subdirectory_target_dirs_in_wasm_ci_jobs
Feb 16, 2026
Merged

Cache subdirectory target dirs in Wasm CI jobs#5439
ndr-ds merged 1 commit intomainfrom
ndr-ds/cache_subdirectory_target_dirs_in_wasm_ci_jobs

Conversation

@ndr-ds
Copy link
Copy Markdown
Contributor

@ndr-ds ndr-ds commented Feb 13, 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/. 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.

Copy link
Copy Markdown
Contributor Author

ndr-ds commented Feb 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ndr-ds ndr-ds requested review from Twey, afck, deuszx, eldios and ma2bd February 13, 2026 18:47
@ndr-ds ndr-ds marked this pull request as ready for review February 16, 2026 18:25
@ndr-ds ndr-ds added this pull request to the merge queue Feb 16, 2026
@eldios
Copy link
Copy Markdown
Collaborator

eldios commented Feb 16, 2026

looks okay to me too

Merged via the queue into main with commit d461a29 Feb 16, 2026
56 checks passed
@ndr-ds ndr-ds deleted the ndr-ds/cache_subdirectory_target_dirs_in_wasm_ci_jobs branch February 16, 2026 19:14
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.
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.

Wasm SDK integration tests are very slow

3 participants