Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. |
915a7f8 to
7aa3271
Compare
|
@ryanofsky can you whitelist |
Thanks, added. This sorry for the delay. If there is a way we could give you github permissions to change these settings that would seem nice too |
|
There's no rush and I don't expect to have to make many such changes. Basic ccache and more tailored nix cache should do the trick. |
3fa8a2c to
34da50f
Compare
|
Looks like the cache got trimmed the first write. Trying again. This push to 34da50f is not expected to be substantially faster, the next push should be. |
|
Depsite the incomplete cache it ran in only 30 minutes. The new cache entry is 1.7 GB. Let's run it again... |
34da50f to
6dc9700
Compare
.github/workflows/ci.yml
Outdated
| if: matrix.config == 'gnu32' | ||
| uses: nix-community/cache-nix-action@v7 | ||
| with: | ||
| primary-key: nix-${{ runner.os }}-${{ matrix.config }}-${{ env.NIXPKGS_CHANNEL }}-${{ hashFiles('shell.nix', 'ci/patches/*.patch', 'ci/configs/gnu32.bash') }}-${{ github.sha }} |
There was a problem hiding this comment.
It might be better to drop -${{ github.sha }} so our cache won't get flushed as often.
|
Down to 3 minutes, nice! |
6dc9700 to
e734375
Compare
|
Trying a different caching approach, using the latest nix channel commit - which doesn't change that often for If it can't get an exact match it will try a broader match, so IIUC even if something in nix changes from under us, we might still get some benefit out of earlier cache entries. Once the build succeeds, it produces a fresh one that's then used in subsequent runs. |
7664d7c to
76d3e51
Compare
76d3e51 to
6562d22
Compare
|
As expected, the last gnu32 CI run found a match for the primary key and did not re-save it. https://github.com/bitcoin-core/libmultiprocess/actions/runs/23025035895/job/66870747483?pr=256 Runtime slightly under 3 minutes. So this should be good to go now. |
|
|
||
| # Use an explicit save step instead of the action post-step so we only | ||
| # archive the store after the build succeeded and the shell closure is | ||
| # rooted against the save-time garbage collection pass. |
There was a problem hiding this comment.
I have no idea what "shell closure is rooted against the save-time garbage collection pass" means, so it would be good for someone who knows Nix to sanity check this.

gnu32 is by far the slowest ci job and it spends most of it's time building Nix stuff.
Caching the Nix store drops subsequent runs to just 3 minutes.
Not caching the other ones, because the cache is quite large and Github limits us to 10GB total.
Using https://github.com/nix-community/cache-nix-action
Closes #254