Skip to content

Commit a28558e

Browse files
Renegade334aduh95
authored andcommitted
tools: cache Rust builds in GHA workflows
Signed-off-by: René <rene@renegade334.me.uk> PR-URL: #67694 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
1 parent 3e4242e commit a28558e

9 files changed

Lines changed: 9 additions & 0 deletions

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
104104
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
105105
SCCACHE_IDLE_TIMEOUT: '0'
106+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
106107
steps:
107108
- name: Install Clang ${{ env.CLANG_VERSION }}
108109
uses: $/.github/actions/install-clang

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ env:
4141
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
4242
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4343
SCCACHE_IDLE_TIMEOUT: '0'
44+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
4445

4546
permissions:
4647
contents: read

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ env:
4141
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
4242
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4343
SCCACHE_IDLE_TIMEOUT: '0'
44+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
4445

4546
permissions:
4647
contents: read

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
# test-linux.yml and test-macos.yml running on the main branch.
5454
SCCACHE_GHA_ENABLED: 'true'
5555
SCCACHE_IDLE_TIMEOUT: '0'
56+
CARGO_BUILD_RUSTC_WRAPPER: sccache
5657
steps:
5758
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5859
with:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ env:
4646
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
4747
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4848
SCCACHE_IDLE_TIMEOUT: '0'
49+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
4950

5051
permissions:
5152
contents: read

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
2828
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
2929
SCCACHE_IDLE_TIMEOUT: '0'
30+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
3031
RUSTC_VERSION: '1.88'
3132

3233
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ env:
3838
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
3939
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4040
SCCACHE_IDLE_TIMEOUT: '0'
41+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
4142
RUSTC_VERSION: '1.88'
4243

4344
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ env:
4646
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
4747
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
4848
SCCACHE_IDLE_TIMEOUT: '0'
49+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
4950
RUSTC_VERSION: '1.88'
5051

5152
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} g++
8585
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
8686
SCCACHE_IDLE_TIMEOUT: '0'
87+
CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }}
8788
steps:
8889
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8990
with:

0 commit comments

Comments
 (0)