Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aab153e

Browse filesBrowse files
joyeecheungaduh95
authored andcommitted
build: skip sscache action on non-main branches
To reduce cache thrashing. PR-URL: #61790 Refs: #61436 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent c2de1fa commit aab153e
Copy full SHA for aab153e

7 files changed

+25-18Lines changed: 25 additions & 18 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/build-tarball.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/build-tarball.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ jobs:
100100
needs: build-tarball
101101
runs-on: ubuntu-24.04
102102
env:
103-
CC: sccache clang-19
104-
CXX: sccache clang++-19
105-
SCCACHE_GHA_ENABLED: 'true'
103+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19
104+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
105+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
106106
SCCACHE_IDLE_TIMEOUT: '0'
107107
steps:
108108
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -120,6 +120,7 @@ jobs:
120120
python-version: ${{ env.PYTHON_VERSION }}
121121
allow-prereleases: true
122122
- name: Set up sccache
123+
if: github.base_ref == 'main' || github.ref_name == 'main'
123124
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
124125
with:
125126
version: v0.12.0
Collapse file

‎.github/workflows/coverage-linux-without-intl.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/coverage-linux-without-intl.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ env:
3737
PYTHON_VERSION: '3.14'
3838
FLAKY_TESTS: keep_retrying
3939
CLANG_VERSION: '19'
40-
CC: sccache clang-19
41-
CXX: sccache clang++-19
42-
SCCACHE_GHA_ENABLED: 'true'
40+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19
41+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
42+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4343
SCCACHE_IDLE_TIMEOUT: '0'
4444

4545
permissions:
@@ -63,6 +63,7 @@ jobs:
6363
python-version: ${{ env.PYTHON_VERSION }}
6464
allow-prereleases: true
6565
- name: Set up sccache
66+
if: github.base_ref == 'main' || github.ref_name == 'main'
6667
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6768
with:
6869
version: v0.12.0
Collapse file

‎.github/workflows/coverage-linux.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/coverage-linux.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ env:
3737
PYTHON_VERSION: '3.14'
3838
FLAKY_TESTS: keep_retrying
3939
CLANG_VERSION: '19'
40-
CC: sccache clang-19
41-
CXX: sccache clang++-19
42-
SCCACHE_GHA_ENABLED: 'true'
40+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19
41+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
42+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4343
SCCACHE_IDLE_TIMEOUT: '0'
4444

4545
permissions:
@@ -63,6 +63,7 @@ jobs:
6363
python-version: ${{ env.PYTHON_VERSION }}
6464
allow-prereleases: true
6565
- name: Set up sccache
66+
if: github.base_ref == 'main' || github.ref_name == 'main'
6667
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6768
with:
6869
version: v0.12.0
Collapse file

‎.github/workflows/test-internet.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test-internet.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ env:
3434
PYTHON_VERSION: '3.14'
3535
FLAKY_TESTS: keep_retrying
3636
CLANG_VERSION: '19'
37-
CC: sccache clang-19
38-
CXX: sccache clang++-19
39-
SCCACHE_GHA_ENABLED: 'true'
37+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19
38+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
39+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4040
SCCACHE_IDLE_TIMEOUT: '0'
4141

4242
permissions:
@@ -60,6 +60,7 @@ jobs:
6060
python-version: ${{ env.PYTHON_VERSION }}
6161
allow-prereleases: true
6262
- name: Set up sccache
63+
if: github.base_ref == 'main' || github.ref_name == 'main'
6364
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6465
with:
6566
version: v0.12.0
Collapse file

‎.github/workflows/test-linux.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test-linux.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ env:
3434
PYTHON_VERSION: '3.14'
3535
FLAKY_TESTS: keep_retrying
3636
CLANG_VERSION: '19'
37-
CC: sccache clang-19
38-
CXX: sccache clang++-19
39-
SCCACHE_GHA_ENABLED: 'true'
37+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19
38+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
39+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4040
SCCACHE_IDLE_TIMEOUT: '0'
4141

4242
permissions:
@@ -65,6 +65,7 @@ jobs:
6565
python-version: ${{ env.PYTHON_VERSION }}
6666
allow-prereleases: true
6767
- name: Set up sccache
68+
if: github.base_ref == 'main' || github.ref_name == 'main'
6869
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6970
with:
7071
version: v0.12.0
Collapse file

‎.github/workflows/test-macos.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test-macos.yml
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ jobs:
7777
fail-fast: false
7878
runs-on: macos-15
7979
env:
80-
CC: sccache gcc
81-
CXX: sccache g++
82-
SCCACHE_GHA_ENABLED: 'true'
80+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} gcc
81+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} g++
82+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
8383
SCCACHE_IDLE_TIMEOUT: '0'
8484
steps:
8585
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -94,6 +94,7 @@ jobs:
9494
- name: Set up Xcode ${{ env.XCODE_VERSION }}
9595
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
9696
- name: Set up sccache
97+
if: github.base_ref == 'main' || github.ref_name == 'main'
9798
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
9899
with:
99100
version: v0.12.0
Collapse file

‎.github/workflows/test-shared.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test-shared.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ jobs:
175175
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
176176

177177
- name: Configure sccache
178+
if: github.base_ref == 'main' || github.ref_name == 'main'
178179
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
179180
with:
180181
script: |

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.