Skip to content

Commit 72913e4

Browse files
committed
Added rustc version to allow for caching
1 parent 05832d2 commit 72913e4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ jobs:
1616
with:
1717
fetch-depth: 2
1818

19+
- name: Install stable Rust
20+
run: rustup update stable && rustup default stable
21+
22+
- name: Set rustc version
23+
run: echo "::set-env name=CURRENT_RUSTC_VERSION::$(rustc -V)"
24+
1925
# Caching
2026
- name: Cache Cargo Registry
2127
uses: actions/cache@v1
@@ -36,12 +42,9 @@ jobs:
3642
uses: actions/cache@v1
3743
with:
3844
path: target
39-
key: ${{ runner.os }}-cargo-build-target-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
45+
key: ${{ runner.os }}-cargo-build-target-${{ CURRENT_RUSTC_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
4046
restore-key: |
41-
${{ runner.os }}-cargo-build-target-${{ steps.rustc.outputs.version }}-
42-
43-
- name: Install stable Rust
44-
run: rustup update stable && rustup default stable
47+
${{ runner.os }}-cargo-build-target-${{ CURRENT_RUSTC_VERSION }}-
4548
4649
- name: Install PostgreSQL
4750
run: |

0 commit comments

Comments
 (0)