Skip to content

ci: improve rust-cache configuration for 100 GB cache limit#4038

Merged
Madoshakalaka merged 1 commit intomasterfrom
fix-rust-cache-config
Mar 3, 2026
Merged

ci: improve rust-cache configuration for 100 GB cache limit#4038
Madoshakalaka merged 1 commit intomasterfrom
fix-rust-cache-config

Conversation

@Madoshakalaka
Copy link
Member

Description

  • Remove all shared-key parameters from Swatinem/rust-cache, letting each job use the default add-job-id-key for per-job cache isolation
  • Add save-if: ${{ github.ref == 'refs/heads/master' }} so only master builds save caches (PRs restore from master but don't save)
  • Fix step ordering in doc_tests and integration_tests so rust-cache runs after toolchain setup (as required by the action's README)

Background

PR #3520 identified that using shared-key causes unrelated jobs to share cache entries, leading to suboptimal cache usage. However, the fix was blocked by the 10 GB cache size limit.

PR #3711 then intentionally added shared-key everywhere to minimize the number of cache entries, trading cache accuracy for smaller total size.

Now that the GitHub Actions cache limit has been raised to 100 GB (thanks to @siku2 ), we can afford per-job caching. This PR revisits the approach from #3520 and goes further:

@Madoshakalaka Madoshakalaka added the A-ci Area: The continuous integration label Mar 3, 2026
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.435 ns      │ 2.67 ns       │ 2.438 ns      │ 2.446 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.436 ns      │ 3.68 ns       │ 2.439 ns      │ 2.454 ns      │ 100     │ 1000000000

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Visit the preview URL for this PR (updated for commit ddc3500):

https://yew-rs--pr4038-fix-rust-cache-confi-wc1045dl.web.app

(expires Tue, 10 Mar 2026 11:46:20 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 100.197 100.197 0 0.000%
boids 168.080 168.080 0 0.000%
communication_child_to_parent 93.472 93.472 0 0.000%
communication_grandchild_with_grandparent 105.248 105.248 0 0.000%
communication_grandparent_to_grandchild 101.609 101.609 0 0.000%
communication_parent_to_child 90.899 90.899 0 0.000%
contexts 105.151 105.151 0 0.000%
counter 86.282 86.282 0 0.000%
counter_functional 88.276 88.276 0 0.000%
dyn_create_destroy_apps 90.320 90.320 0 0.000%
file_upload 99.346 99.346 0 0.000%
function_delayed_input 94.374 94.374 0 0.000%
function_memory_game 172.943 172.943 0 0.000%
function_router 406.410 406.410 0 0.000%
function_todomvc 164.160 164.160 0 0.000%
futures 235.159 235.159 0 0.000%
game_of_life 104.718 104.718 0 0.000%
immutable 255.879 255.879 0 0.000%
inner_html 80.803 80.803 0 0.000%
js_callback 109.379 109.379 0 0.000%
keyed_list 179.728 179.728 0 0.000%
mount_point 84.146 84.146 0 0.000%
nested_list 113.059 113.059 0 0.000%
node_refs 91.526 91.526 0 0.000%
password_strength 1729.146 1729.146 0 0.000%
portals 93.034 93.034 0 0.000%
router 376.976 376.976 0 0.000%
suspense 113.464 113.464 0 0.000%
timer 88.634 88.634 0 0.000%
timer_functional 98.877 98.877 0 0.000%
todomvc 142.088 142.088 0 0.000%
two_apps 86.146 86.146 0 0.000%
web_worker_fib 136.239 136.239 0 0.000%
web_worker_prime 187.470 187.470 0 0.000%
webgl 83.224 83.224 0 0.000%

✅ None of the examples has changed their size significantly.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 296.710 314.426 308.296 4.962
Hello World 10 468.964 481.336 477.633 4.050
Function Router 10 30681.113 31797.483 31353.218 358.949
Concurrent Task 10 1005.360 1008.159 1006.667 0.783
Many Providers 10 1084.942 1133.533 1113.689 18.263

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 290.094 311.070 304.555 7.604
Hello World 10 477.900 512.543 494.711 14.432
Function Router 10 30126.233 31180.332 30646.940 362.983
Concurrent Task 10 1005.456 1007.571 1006.537 0.643
Many Providers 10 1045.338 1132.216 1101.022 30.141

@Madoshakalaka Madoshakalaka merged commit 19b1869 into master Mar 3, 2026
25 checks passed
@Madoshakalaka Madoshakalaka deleted the fix-rust-cache-config branch March 3, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Area: The continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant