Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upload cache only from test jobs #4077

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

KapJI
Copy link
Contributor

@KapJI KapJI commented Nov 10, 2024

Changes

  • Upload caches from test jobs allows to run tests faster even if source code changes.
  • Create custom composite action to deduplicate caching code.
  • Switch macos jobs to the latest macos-15. They can share the same cache entry now, so this saves one cache entry.
  • Swich test-ubuntu jobs to ubuntu-22.04. Using old glibc only makes sense for release jobs. Using the same ubuntu version as for all other jobs allows sharing cache more effectively.
  • Update name for test-ubuntu-umask0xx job.

Results

  • codeql: 2m56s -> 2m18s, 21% faster
  • test-ubuntu-umask002: 6m43s -> 5m35s, 17% faster
  • test-ubuntu-umask022: 7m29s -> 6m12s, 17% faster
  • test-windows: 7m14s -> 6m12s, 14% faster
  • test-macos: 8m46s -> 8m32s. Here cache was already uploaded from the same job (because lint-macos is ARM and this was X64), the difference is from changing runner.
  • Extra cache entries consume 300 MB (3*100MB delta)
  • Removed macOS-x64 cache entry, saved 400 MB.

@KapJI KapJI force-pushed the better-caching branch 8 times, most recently from b3498a4 to 7cd1401 Compare November 10, 2024 22:44
@KapJI KapJI closed this Nov 10, 2024
@KapJI KapJI reopened this Nov 10, 2024
@KapJI KapJI force-pushed the better-caching branch 4 times, most recently from 03a0478 to 5043558 Compare November 10, 2024 23:37
@KapJI KapJI marked this pull request as ready for review November 11, 2024 00:08
@twpayne twpayne merged commit 531bb7a into twpayne:master Nov 11, 2024
24 checks passed
@twpayne
Copy link
Owner

twpayne commented Nov 11, 2024

Awesome, thank you!

@KapJI KapJI deleted the better-caching branch November 11, 2024 12:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants