build: skip sscache action on non-main branches#61790
Open
joyeecheung wants to merge 2 commits intonodejs:mainfrom
Open
build: skip sscache action on non-main branches#61790joyeecheung wants to merge 2 commits intonodejs:mainfrom
joyeecheung wants to merge 2 commits intonodejs:mainfrom
Conversation
To reduce cache thrashing.
Collaborator
|
Review requested:
|
marco-ippolito
approved these changes
Feb 12, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61790 +/- ##
==========================================
- Coverage 89.76% 88.83% -0.93%
==========================================
Files 675 675
Lines 204674 204806 +132
Branches 39330 39269 -61
==========================================
- Hits 183716 181946 -1770
- Misses 13235 15084 +1849
- Partials 7723 7776 +53 🚀 New features to boost your workflow:
|
bnb
approved these changes
Feb 12, 2026
targos
approved these changes
Feb 12, 2026
lpinca
approved these changes
Feb 12, 2026
aduh95
reviewed
Feb 13, 2026
aduh95
reviewed
Feb 13, 2026
aduh95
reviewed
Feb 13, 2026
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
aduh95
reviewed
Feb 17, 2026
| --keep SCCACHE_GHA_VERSION --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \ | ||
| --arg loadJSBuiltinsDynamically false \ | ||
| --arg ccache '(import <nixpkgs> {}).sccache' \ | ||
| --arg ccache '${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'import <nixpkgs> {}).sccache' || 'null' }}' \ |
Contributor
There was a problem hiding this comment.
Suggested change
| --arg ccache '${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'import <nixpkgs> {}).sccache' || 'null' }}' \ | |
| --arg ccache '${{ (github.base_ref == 'main' || github.ref_name == 'main') && '(import <nixpkgs> {}).sccache' || 'null' }}' \ |
aduh95
reviewed
Feb 17, 2026
Comment on lines
+40
to
+41
| CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache clang-19' || 'clang-19' }} | ||
| CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache clang++-19' || 'clang++-19' }} |
Contributor
There was a problem hiding this comment.
Can we apply the same here, to avoid repetition
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.
To reduce cache thrashing.
From a look at the action results, PRs targeting non-main generally don't have a good cache hit rate anyway, so it seems better to just keep it to main where the majority of the volume is:
https://github.com/nodejs/node/actions/runs/21866462915
https://github.com/nodejs/node/actions/runs/21866461713
Refs: #61436