File tree 12 files changed +34
-12
lines changed
12 files changed +34
-12
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,17 @@ jobs:
45
45
~/.cargo/registry
46
46
~/.cargo/git
47
47
key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
48
+ - name : Get rustc commit hash
49
+ id : cargo-target-cache
50
+ run : |
51
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
52
+ shell : bash
48
53
- name : Cache cargo build
49
54
uses : actions/cache@v2
50
55
with :
51
56
path : target
52
- key : ${{ runner.os }}-cargo-build-clippy-beta-${{ hashFiles('**/Cargo.lock') }}
57
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ runner.os }}-cargo-clippy-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
58
+ restore-keys : ${{ github.base_ref }}-${{ runner.os }}-cargo-clippy-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
53
59
- name : Install Rustup using ./rustup-init.sh
54
60
run : |
55
61
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 71
71
uses : actions/cache@v2
72
72
with :
73
73
path : target
74
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
74
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
75
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
75
76
- name : Install Rustup using ./rustup-init.sh
76
77
run : |
77
78
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 64
64
uses : actions/cache@v2
65
65
with :
66
66
path : target
67
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
67
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
68
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
68
69
- name : Install Rustup using ./rustup-init.sh
69
70
run : |
70
71
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 92
92
uses : actions/cache@v2
93
93
with :
94
94
path : target
95
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
95
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
96
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
96
97
- name : Install Rustup using ./rustup-init.sh
97
98
run : |
98
99
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 57
57
uses : actions/cache@v2
58
58
with :
59
59
path : target
60
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
60
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
61
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
61
62
- name : Install Rustup using ./rustup-init.sh
62
63
run : |
63
64
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 79
79
uses : actions/cache@v2
80
80
with :
81
81
path : target
82
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
82
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
83
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
83
84
- name : Install Rustup using win.rustup.rs
84
85
run : |
85
86
# Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change 76
76
uses : actions/cache@v2
77
77
with :
78
78
path : target
79
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
79
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
80
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
80
81
- name : Install Rustup using win.rustup.rs
81
82
run : |
82
83
# Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change 79
79
uses : actions/cache@v2
80
80
with :
81
81
path : target
82
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
82
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
83
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
83
84
- name : Install Rustup using win.rustup.rs
84
85
run : |
85
86
# Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change @@ -45,11 +45,17 @@ jobs:
45
45
~/.cargo/registry
46
46
~/.cargo/git
47
47
key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
48
+ - name : Get rustc commit hash
49
+ id : cargo-target-cache
50
+ run : |
51
+ echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
52
+ shell : bash
48
53
- name : Cache cargo build
49
54
uses : actions/cache@v2
50
55
with :
51
56
path : target
52
- key : ${{ runner.os }}-cargo-build-clippy-beta-${{ hashFiles('**/Cargo.lock') }}
57
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ runner.os }}-cargo-clippy-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
58
+ restore-keys : ${{ github.base_ref }}-${{ runner.os }}-cargo-clippy-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
53
59
- name : Install Rustup using ./rustup-init.sh
54
60
run : |
55
61
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ jobs:
100
100
uses : actions/cache@v2
101
101
with :
102
102
path : target
103
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
103
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
104
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
104
105
- name : Install Rustup using ./rustup-init.sh
105
106
run : |
106
107
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 57
57
uses : actions/cache@v2
58
58
with :
59
59
path : target
60
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
60
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
61
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
61
62
- name : Install Rustup using ./rustup-init.sh
62
63
run : |
63
64
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 87
87
uses : actions/cache@v2
88
88
with :
89
89
path : target
90
- key : ${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
90
+ key : ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
91
+ restore-keys : ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
91
92
- name : Install Rustup using win.rustup.rs
92
93
run : |
93
94
# Disable the download progress bar which can cause perf issues
You can’t perform that action at this time.
0 commit comments