Skip to content

Commit

Permalink
Use hash of Cargo.lock file in cache name
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jan 31, 2020
1 parent 55c33e6 commit ff49403
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ jobs:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Run cargo update
run: cargo update
- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Checkout
uses: actions/checkout@v2.0.0
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh

Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,17 @@ jobs:
toolchain: nightly
target: ${{ matrix.host }}
profile: minimal
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Run cargo update
run: cargo update
- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-${{ matrix.host }}
- name: Checkout
uses: actions/checkout@v2.0.0
key: ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.host }}
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
env:
Expand Down Expand Up @@ -163,13 +167,17 @@ jobs:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Run cargo update
run: cargo update
- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Checkout
uses: actions/checkout@v2.0.0
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh

Expand Down Expand Up @@ -226,13 +234,17 @@ jobs:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Run cargo update
run: cargo update
- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Checkout
uses: actions/checkout@v2.0.0
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh

Expand Down

0 comments on commit ff49403

Please sign in to comment.