-
Notifications
You must be signed in to change notification settings - Fork 38.7k
ci: add option for running tests without volume #30310
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
48e1a1f to
5bf7a08
Compare
5bf7a08 to
cae08eb
Compare
|
Setting to draft while I fix the job, will test on my own fork and re-open when ready for review. |
cae08eb to
5611197
Compare
.github/workflows/ci.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was made as a step and not in the env: section of the job as ${{ runner.temp }} is only available in the run steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUNNER_TEMP was used over ${{ github.workspace }} (as is used in the MacOS job) because the CI container mounts that as readonly which means it can't be used to write cache items to.
maflcko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
Maybe wait for the CI to pass, then address the nits to test the created cache?
|
Is there a reason why we don't want to just have cirrus behave in the same way we'd do it on GHA, seems like GHA cannot store to shared cache but cirrus can act the same was as GHA. Just thinking maybe theres a way to reduce complexity in if I were to set |
Yes, it is possible to do the same on cirrus. However, for local runs it can not be done, because |
Oh, I guess only master creates the cache? So I guess this can be merged after addressing the nits. |
DANGER_CI_ON_HOST_CACHE_FOLDERS if set will mount caches in directories on the host rather than in docker volumes. Supports saving and restoring caches on Github Actions.
5611197 to
4ecbbd9
Compare
Branches on forks work, see cache restore here: https://github.com/m3dwards/bitcoin/actions/runs/9601151359/job/26479048839 |
|
Nits should be addressed @maflcko |
|
This job has a ccache size limit of 100mb, the MacOS job has a ccache limit of 400m. @hebasto is there something specific to MacOS for why the ccache limit is higher there? |
When I adjusted ccache size limits, I picked a size that allowed to populate the cleared cache with no cleanups in the |
Maybe comment that line out in a temporary "NO MERGE" commit? |
|
utACK 4ecbbd9 |
I've pushed a modified branch to my personal account. Here is a CI job: https://github.com/hebasto/bitcoin/actions/runs/9611511964/job/26510228294. |
Me also a few comments up :) |
Oh sorry, I missed it. |
Could you please rerun that job one more time to ensure that |
|
Although I can see the cache get restored the job is no faster so I'm not sure it's working.
Will do this |
|
Re-running but the cache hit rate at the moment is low: ccache version 4.9.1
Cacheable calls: 770 / 782 (98.47%)
Hits: 59 / 770 ( 7.66%)
Direct: 7 / 59 (11.86%)
Preprocessed: 52 / 59 (88.14%)
Misses: 711 / 770 (92.34%)
Uncacheable calls: 12 / 782 ( 1.53%)
Local storage:
Cache size (GB): 0.1 / 0.1 (102.4%)
Cleanups: 604
Hits: 59 / 770 ( 7.66%)
Misses: 711 / 770 (92.34%) |
The recent successive "ASan + LSan + UBSan + integer, no depends, USDT" job for the master branch on the Cirrus CI was https://cirrus-ci.com/task/6204664989876224. The merged PR did not touch C++ code at all. However, the hit rate is far from 100%: I wonder, is it ccache compatibility issue with some sanitizer instrumentations? |
|
The Cirrus cache is shared with pull requests, so it can not be used to compare it here. You'd have to run it locally on a fresh VM, twice. |
|
Re-run results on GHA: ccache version 4.9.1
Cacheable calls: 770 / 782 (98.47%)
Hits: 62 / 770 ( 8.05%)
Direct: 9 / 62 (14.52%)
Preprocessed: 53 / 62 (85.48%)
Misses: 708 / 770 (91.95%)
Uncacheable calls: 12 / 782 ( 1.53%)
Local storage:
Cache size (GB): 0.1 / 0.1 (102.4%)
Cleanups: 616
Hits: 62 / 770 ( 8.05%)
Misses: 708 / 770 (91.95%)I will increase the size and see if it helps |
Yes. Especially, considering too many cleanups. |
From my tests it follows that the |
|
utACK da205dd |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK da205dd.
|
Looking much better with bigger cache size: ccache version 4.9.1
Cacheable calls: 770 / 782 (98.47%)
Hits: 769 / 770 (99.87%)
Direct: 769 / 769 (100.0%)
Preprocessed: 0 / 769 ( 0.00%)
Misses: 1 / 770 ( 0.13%)
Uncacheable calls: 12 / 782 ( 1.53%)
Local storage:
Cache size (GB): 0.2 / 0.2 (96.47%)
Hits: 769 / 770 (99.87%)
Misses: 1 / 770 ( 0.13%)ASan job has gone from 79 minutes down to 46 minutes with cache. |
Fixes: #30193 (comment)
Cache wasn't being saved when run on GHA because the default behaviour of the CI script was to store cache items in a docker volume. This works on Cirrus CI as the volumes are shared but it does not work on Github Actions in which each run is ephemeral.
Kept the default behaviour the same so hopefully this continues to work for the Cirrus CI jobs.