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 cc4f7af

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 2ea16d3 commit cc4f7af
Copy full SHA for cc4f7af

5 files changed

+20-15Lines changed: 20 additions & 15 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
@@ -66,9 +66,9 @@ jobs:
6666
needs: build-tarball
6767
runs-on: ubuntu-24.04
6868
env:
69-
CC: sccache clang
70-
CXX: sccache clang++
71-
SCCACHE_GHA_ENABLED: 'true'
69+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang
70+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++
71+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
7272
steps:
7373
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7474
with:
@@ -78,6 +78,7 @@ jobs:
7878
with:
7979
python-version: ${{ env.PYTHON_VERSION }}
8080
- name: Set up sccache
81+
if: github.base_ref == 'main' || github.ref_name == 'main'
8182
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
8283
with:
8384
version: v0.10.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
@@ -36,9 +36,9 @@ concurrency:
3636
env:
3737
PYTHON_VERSION: '3.12'
3838
FLAKY_TESTS: keep_retrying
39-
CC: sccache clang
40-
CXX: sccache clang++
41-
SCCACHE_GHA_ENABLED: 'true'
39+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang
40+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++
41+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4242

4343
permissions:
4444
contents: read
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
python-version: ${{ env.PYTHON_VERSION }}
5959
- name: Set up sccache
60+
if: github.base_ref == 'main' || github.ref_name == 'main'
6061
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6162
with:
6263
version: v0.10.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
@@ -36,9 +36,9 @@ concurrency:
3636
env:
3737
PYTHON_VERSION: '3.12'
3838
FLAKY_TESTS: keep_retrying
39-
CC: sccache clang
40-
CXX: sccache clang++
41-
SCCACHE_GHA_ENABLED: 'true'
39+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang
40+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++
41+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4242

4343
permissions:
4444
contents: read
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
python-version: ${{ env.PYTHON_VERSION }}
5959
- name: Set up sccache
60+
if: github.base_ref == 'main' || github.ref_name == 'main'
6061
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
6162
with:
6263
version: v0.10.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
@@ -27,9 +27,9 @@ concurrency:
2727
env:
2828
PYTHON_VERSION: '3.12'
2929
FLAKY_TESTS: keep_retrying
30-
CC: sccache clang
31-
CXX: sccache clang++
32-
SCCACHE_GHA_ENABLED: 'true'
30+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang
31+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++
32+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
3333

3434
permissions:
3535
contents: read
@@ -47,6 +47,7 @@ jobs:
4747
with:
4848
python-version: ${{ env.PYTHON_VERSION }}
4949
- name: Set up sccache
50+
if: github.base_ref == 'main' || github.ref_name == 'main'
5051
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
5152
with:
5253
version: v0.10.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
@@ -40,9 +40,9 @@ jobs:
4040
if: github.event.pull_request.draft == false
4141
runs-on: macos-14
4242
env:
43-
CC: sccache gcc
44-
CXX: sccache g++
45-
SCCACHE_GHA_ENABLED: 'true'
43+
CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} gcc
44+
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} g++
45+
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4646
steps:
4747
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4848
with:
@@ -52,6 +52,7 @@ jobs:
5252
with:
5353
python-version: ${{ env.PYTHON_VERSION }}
5454
- name: Set up sccache
55+
if: github.base_ref == 'main' || github.ref_name == 'main'
5556
uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
5657
with:
5758
version: v0.10.0

0 commit comments

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