tools: improve benchmark build cache reuse - #65859
Open
panva wants to merge 1 commit into
Open
Conversation
Match Linux x64 benchmark builds to the Perfetto-enabled V8 configuration already cached by shared-library CI. Enable the GHA sccache backend in read-only mode for base builds. Retain the compiler wrapper for incremental PR builds, but stop the remote-backed server and use a read-only local cache for PR code. Assisted-by: GitHub Copilot Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Collaborator
|
Review requested:
|
jasnell
approved these changes
Sep 6, 2026
aduh95
reviewed
Sep 6, 2026
Comment on lines
+130
to
+132
| set -e | ||
| make build-ci -j4 V=1 | ||
| sccache --stop-server |
Contributor
There was a problem hiding this comment.
nit
Suggested change
| set -e | |
| make build-ci -j4 V=1 | |
| sccache --stop-server | |
| make build-ci -j4 V=1 && sccache --stop-server |
| --arg useSeparateDerivationForV8 true \ | ||
| --arg withPerfetto ${{ matrix.perfetto || false }} \ | ||
| --arg loadJSBuiltinsDynamically false \ | ||
| --arg ccache "${NIX_SCCACHE:-null}" \ |
Contributor
There was a problem hiding this comment.
If we use sscache in the --run, we shouldn't default to null. I suggest we remove NIX_SCCACHE
Suggested change
| --arg ccache "${NIX_SCCACHE:-null}" \ | |
| --arg ccache '(import <nixpkgs> {}).sccache' \ |
Alternatively, we could add a Bash assertion
Suggested change
| --arg ccache "${NIX_SCCACHE:-null}" \ | |
| --arg ccache "${NIX_SCCACHE:?}" \ |
| --arg withPerfetto ${{ matrix.perfetto || false }} \ | ||
| --arg loadJSBuiltinsDynamically false \ | ||
| --arg ccache 'null' \ | ||
| --arg ccache "${NIX_SCCACHE:-null}" \ |
Contributor
There was a problem hiding this comment.
Same here (although we don't explicitly call sscache here, so I guess it could stay – but I reckon we'd prefer to be consistent).
Is there any point to have sccache for this step? Either the object is already compiled locally (in which case, no need for sccache, Ninja will simply reuse it), either it's not and there's no reason to believe it would be in the cache either (especially the local one), or am I forgetting something?
| - runner: macos-latest | ||
| system: aarch64-darwin | ||
| name: '${{ matrix.system }}: with shared libraries' | ||
| name: '${{ matrix.system }}: with shared libraries${{ matrix.perfetto && '' and perfetto'' || '''' }}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ought to speed up benchmark runs by reusing the Perfetto-enabled V8 build already cached by shared-library CI on Linux x64. It also fixes the sccache setup while keeping cache access read-only and preserving incremental PR rebuilds.
Match Linux x64 benchmark builds to the Perfetto-enabled V8 configuration already cached by shared-library CI.
Enable the GHA sccache backend in read-only mode for base builds. Retain the compiler wrapper for incremental PR builds, but stop the remote-backed server and use a read-only local cache for PR code.
Assisted-by: GitHub Copilot