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

run_tests workflow: add sccache #3127

Merged
merged 5 commits into from
Aug 25, 2023
Merged

Conversation

sporksmith
Copy link
Contributor

@sporksmith sporksmith commented Aug 24, 2023

  • Set up and use sccache in the "run_tests" workflow. This causes it to be about as fast as the "run_tests_incremental" workflow. It brings the total run time from 2.5h to about 1.5h
  • Delete the "run_tests_incremental" workflow. It no longer has a speed advantage over the "run_tests" workflow, required periodically generating new pre-baked Docker images (which currently involved manually running the workflow), and is conceptually more complicated.
  • Disable rust incremental builds in the extra_tests workflow. I think they may be causing the cache to be incompatible with the cache of the same system config in the "run_tests" workflow, and incremental builds are unhelpful overhead in this case anyway.

@github-actions github-actions bot added the Component: Testing Unit and integration tests and frameworks label Aug 24, 2023
@sporksmith sporksmith changed the title Test commit run_tests workflow: add sccache Aug 24, 2023
@sporksmith sporksmith marked this pull request as ready for review August 24, 2023 20:47
@sporksmith
Copy link
Contributor Author

@robgjansen you might also want to take a look to verify this makes sense for "maintenance mode"

the sccaches are around 400 MB each, and I think the account limit is 10 GB, so you might occasionally need to manually delete some caches if too many new versions end up getting saved before they get GC'd

@sporksmith
Copy link
Contributor Author

@robgjansen
Copy link
Member

Hmm it looks like we're already over our cache limit and for now Github is doing the smart thing:

Screenshot 2023-08-24 at 7 24 16 PM

So I think we're a 👍 for maintenance mode. :)

.github/workflows/run_tests.yml Outdated Show resolved Hide resolved
.github/workflows/extra_tests.yml Outdated Show resolved Hide resolved
This is redundant with the "run_tests" workflow, which is now just as
fast since adding sccache.
* Incremental builds don't help here
* sccache won't cache incrementally compiled crates
* this is also set in the "run_tests" workflow, where the corresponding
  configuration shares cache with this job. Using different
  configurations may cause the caches to be incompatible (i.e. cause
  cache misses)
I don't think SCCACHE_RECACHE would have worked as intended in this
scenario. It tells the sccache server to reset its cache, but the CI
wouldn't have written back the cache anyway since the cache key didn't
change.

Instead we can increment SCCACHE_CACHE_VERSION to force new caches to be
saved.
@sporksmith sporksmith merged commit 0fdc1c8 into shadow:main Aug 25, 2023
23 checks passed
@sporksmith sporksmith deleted the workflows branch August 25, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Testing Unit and integration tests and frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants