File tree Expand file tree Collapse file tree 12 files changed +34
-12
lines changed Expand file tree Collapse file tree 12 files changed +34
-12
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,17 @@ jobs:
4545 ~/.cargo/registry
4646 ~/.cargo/git
4747 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
4853 - name : Cache cargo build
4954 uses : actions/cache@v2
5055 with :
5156 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') }}
5359 - name : Install Rustup using ./rustup-init.sh
5460 run : |
5561 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 7171 uses : actions/cache@v2
7272 with :
7373 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') }}
7576 - name : Install Rustup using ./rustup-init.sh
7677 run : |
7778 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 6464 uses : actions/cache@v2
6565 with :
6666 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') }}
6869 - name : Install Rustup using ./rustup-init.sh
6970 run : |
7071 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 9292 uses : actions/cache@v2
9393 with :
9494 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') }}
9697 - name : Install Rustup using ./rustup-init.sh
9798 run : |
9899 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 5757 uses : actions/cache@v2
5858 with :
5959 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') }}
6162 - name : Install Rustup using ./rustup-init.sh
6263 run : |
6364 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Original file line number Diff line number Diff line change 7979 uses : actions/cache@v2
8080 with :
8181 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') }}
8384 - name : Install Rustup using win.rustup.rs
8485 run : |
8586 # Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change 7676 uses : actions/cache@v2
7777 with :
7878 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') }}
8081 - name : Install Rustup using win.rustup.rs
8182 run : |
8283 # Disable the download progress bar which can cause perf issues
Original file line number Diff line number Diff line change 7979 uses : actions/cache@v2
8080 with :
8181 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') }}
8384 - name : Install Rustup using win.rustup.rs
8485 run : |
8586 # 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:
4545 ~/.cargo/registry
4646 ~/.cargo/git
4747 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
4853 - name : Cache cargo build
4954 uses : actions/cache@v2
5055 with :
5156 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') }}
5359 - name : Install Rustup using ./rustup-init.sh
5460 run : |
5561 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:
100100 uses : actions/cache@v2
101101 with :
102102 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') }}
104105 - name : Install Rustup using ./rustup-init.sh
105106 run : |
106107 sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
You can’t perform that action at this time.
0 commit comments