Skip to content

Commit 969950f

Browse files
authored
Enable sccache: new method
1 parent 0e26622 commit 969950f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
CARGO_TERM_COLOR: always
1212
RUSTC_WRAPPER: "sccache"
13+
SCCACHE_GHA_ENABLED: "true"
1314

1415
jobs:
1516
build:
@@ -37,13 +38,12 @@ jobs:
3738
run: |
3839
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
3940
shell: bash
40-
- name: Cache cargo registry and sccache
41+
- name: Cache cargo registry
4142
uses: actions/cache@v3
4243
continue-on-error: false
4344
with:
4445
path: |
4546
~/.cargo/registry
46-
~/.cache/sccache
4747
key: rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
4848
restore-keys: |
4949
rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-
@@ -97,13 +97,12 @@ jobs:
9797
run: |
9898
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
9999
shell: bash
100-
- name: Cache cargo registry and sccache
100+
- name: Cache cargo registry
101101
uses: actions/cache@v3
102102
continue-on-error: false
103103
with:
104104
path: |
105105
~/.cargo/registry
106-
~/.cache/sccache
107106
key: rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
108107
restore-keys: |
109108
rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-

.github/workflows/windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
env:
1313
CARGO_TERM_COLOR: always
1414
RUSTC_WRAPPER: "sccache"
15+
SCCACHE_GHA_ENABLED: "true"
16+
1517

1618
jobs:
1719
build:
@@ -57,13 +59,12 @@ jobs:
5759
run: |
5860
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
5961
shell: bash
60-
- name: Cache cargo registry and sccache
62+
- name: Cache cargo registry
6163
uses: actions/cache@v3
6264
continue-on-error: false
6365
with:
6466
path: |
6567
~/.cargo/registry
66-
~/.cache/sccache
6768
key: rust-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
6869
restore-keys: |
6970
rust-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}
@@ -135,7 +136,6 @@ jobs:
135136
with:
136137
path: |
137138
~/.cargo/registry
138-
~/.cache/sccache
139139
key: rust-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
140140
restore-keys: |
141141
rust-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}

0 commit comments

Comments
 (0)