-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
build: skip sscache action on non-main branches #61790
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -175,6 +175,7 @@ jobs: | |||||||||
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||||||||||
|
|
||||||||||
| - name: Configure sccache | ||||||||||
| if: github.base_ref == 'main' || github.ref_name == 'main' | ||||||||||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | ||||||||||
| with: | ||||||||||
| script: | | ||||||||||
|
|
@@ -195,9 +196,9 @@ jobs: | |||||||||
| nix-shell \ | ||||||||||
| -I nixpkgs=./tools/nix/pkgs.nix \ | ||||||||||
| --pure --keep TAR_DIR --keep FLAKY_TESTS \ | ||||||||||
| --keep SCCACHE_GHA_VERSION --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \ | ||||||||||
| ${{ (github.base_ref == 'main' || github.ref_name == 'main') && '--keep SCCACHE_GHA_VERSION --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN' || '' }} \ | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I would simplify this, it's no big deal if we pass not-defined variables
Suggested change
|
||||||||||
| --arg loadJSBuiltinsDynamically false \ | ||||||||||
| --arg ccache '(import <nixpkgs> {}).sccache' \ | ||||||||||
| ${{ (github.base_ref == 'main' || github.ref_name == 'main') && '--arg ccache ''(import <nixpkgs> {}).sccache''' || '' }} \ | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should set it to
Suggested change
Alternatively, we could define it in the
Suggested change
|
||||||||||
| --arg devTools '[]' \ | ||||||||||
| --arg benchmarkTools '[]' \ | ||||||||||
| ${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }} | ||||||||||
|
|
||||||||||
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.
Can we avoid the repetition?