File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,16 @@ jobs:
82
82
with :
83
83
path : ~/.cargo/git
84
84
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
85
+ - name : Get rustc commit hash
86
+ id : cargo-target-cache
87
+ run : |
88
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
89
+ shell : bash
85
90
- name : Cache cargo build
86
91
uses : actions/cache@v1
87
92
with :
88
93
path : target
89
- key : ${{ runner.os }}-cargo-build-trimmed -${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
94
+ key : ${{ matrix.target }}-cargo-target-dir -${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
90
95
- name : Install Rustup using ./rustup-init.sh
91
96
run : |
92
97
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change @@ -51,11 +51,16 @@ jobs:
51
51
with :
52
52
path : ~/.cargo/git
53
53
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
54
+ - name : Get rustc commit hash
55
+ id : cargo-target-cache
56
+ run : |
57
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
58
+ shell : bash
54
59
- name : Cache cargo build
55
60
uses : actions/cache@v1
56
61
with :
57
62
path : target
58
- key : ${{ runner.os }}-cargo-build-trimmed -${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
63
+ key : ${{ matrix.target }}-cargo-target-dir -${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
59
64
- name : Install Rustup using ./rustup-init.sh
60
65
run : |
61
66
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change @@ -81,11 +81,16 @@ jobs:
81
81
with :
82
82
path : ~/.cargo/git
83
83
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
84
+ - name : Get rustc commit hash
85
+ id : cargo-target-cache
86
+ run : |
87
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
88
+ shell : bash
84
89
- name : Cache cargo build
85
90
uses : actions/cache@v1
86
91
with :
87
92
path : target
88
- key : ${{ runner.os }}-cargo-build-static-crt-trimmed- ${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
93
+ key : ${{ matrix.target }}-cargo-target-dir- ${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
89
94
- name : Install Rustup using win.rustup.rs
90
95
run : |
91
96
# Disable the download progress bar which can cause perf issues
You can’t perform that action at this time.
0 commit comments