File tree Expand file tree Collapse file tree 7 files changed +42
-7
lines changed Expand file tree Collapse file tree 7 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,16 @@ jobs:
60
60
with :
61
61
path : ~/.cargo/git
62
62
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
63
+ - name : Get rustc commit hash
64
+ id : cargo-target-cache
65
+ run : |
66
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
67
+ shell : bash
63
68
- name : Cache cargo build
64
69
uses : actions/cache@v1
65
70
with :
66
71
path : target
67
- key : ${{ runner.os }}-cargo-build-trimmed -${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
72
+ key : ${{ matrix.target }}-cargo-target-dir -${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
68
73
- name : Install Rustup using ./rustup-init.sh
69
74
run : |
70
75
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change @@ -55,11 +55,16 @@ jobs:
55
55
with :
56
56
path : ~/.cargo/git
57
57
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
58
+ - name : Get rustc commit hash
59
+ id : cargo-target-cache
60
+ run : |
61
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
62
+ shell : bash
58
63
- name : Cache cargo build
59
64
uses : actions/cache@v1
60
65
with :
61
66
path : target
62
- key : ${{ runner.os }}-cargo-build-trimmed -${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
67
+ key : ${{ matrix.target }}-cargo-target-dir -${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
63
68
- name : Install Rustup using ./rustup-init.sh
64
69
run : |
65
70
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change @@ -74,11 +74,16 @@ jobs:
74
74
with :
75
75
path : ~/.cargo/git
76
76
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
77
+ - name : Get rustc commit hash
78
+ id : cargo-target-cache
79
+ run : |
80
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
81
+ shell : bash
77
82
- name : Cache cargo build
78
83
uses : actions/cache@v1
79
84
with :
80
85
path : target
81
- key : ${{ runner.os }}-cargo-build-trimmed -${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
86
+ key : ${{ matrix.target }}-cargo-target-dir -${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
82
87
- name : Install Rustup using ./rustup-init.sh
83
88
run : |
84
89
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 @@ -73,11 +73,16 @@ jobs:
73
73
with :
74
74
path : ~/.cargo/git
75
75
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
76
+ - name : Get rustc commit hash
77
+ id : cargo-target-cache
78
+ run : |
79
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
80
+ shell : bash
76
81
- name : Cache cargo build
77
82
uses : actions/cache@v1
78
83
with :
79
84
path : target
80
- key : ${{ runner.os }}-cargo-build-static-crt-trimmed- ${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
85
+ key : ${{ matrix.target }}-cargo-target-dir- ${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
81
86
- name : Install Rustup using win.rustup.rs
82
87
run : |
83
88
# Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change @@ -70,11 +70,16 @@ jobs:
70
70
with :
71
71
path : ~/.cargo/git
72
72
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
73
+ - name : Get rustc commit hash
74
+ id : cargo-target-cache
75
+ run : |
76
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
77
+ shell : bash
73
78
- name : Cache cargo build
74
79
uses : actions/cache@v1
75
80
with :
76
81
path : target
77
- key : ${{ runner.os }}-cargo-build-static-crt-trimmed- ${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
82
+ key : ${{ matrix.target }}-cargo-target-dir- ${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
78
83
- name : Install Rustup using win.rustup.rs
79
84
run : |
80
85
# Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change @@ -73,11 +73,16 @@ jobs:
73
73
with :
74
74
path : ~/.cargo/git
75
75
key : ${{ runner.os }}-cargo-gits-trimmed-${{ hashFiles('**/Cargo.lock') }}
76
+ - name : Get rustc commit hash
77
+ id : cargo-target-cache
78
+ run : |
79
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
80
+ shell : bash
76
81
- name : Cache cargo build
77
82
uses : actions/cache@v1
78
83
with :
79
84
path : target
80
- key : ${{ runner.os }}-cargo-build-static-crt-trimmed- ${{ matrix. target }}-${{ hashFiles('**/Cargo.lock') }}
85
+ key : ${{ matrix.target }}-cargo-target-dir- ${{ steps.cargo- target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
81
86
- name : Install Rustup using win.rustup.rs
82
87
run : |
83
88
# Disable the download progress bar which can cause perf issues
You can’t perform that action at this time.
0 commit comments