Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4f70093

Browse files
committed
advanced GHA
1 parent 61265f5 commit 4f70093

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
# we cannot reuse anyway when the nightly changes (and it grows quite large
4747
# over time).
4848
- name: Add cache for cargo
49-
uses: actions/cache@v2
49+
id: cache
50+
uses: actions/cache@v3
5051
with:
5152
path: |
5253
# Taken from <https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci>.
@@ -61,11 +62,11 @@ jobs:
6162
restore-keys: ${{ runner.os }}-cargo
6263

6364
- name: Install rustup-toolchain-install-master and xargo
65+
if: ${{ steps.cache.outputs.cache-hit == 'false' }}
6466
shell: bash
6567
run: |
66-
# Only install tools if we don't have them cached
67-
if ! which rustup-toolchain-install-master; then cargo install rustup-toolchain-install-master; fi
68-
if ! which xargo; then cargo install xargo; fi
68+
cargo install rustup-toolchain-install-master
69+
cargo install xargo
6970
7071
- name: Install "master" toolchain
7172
shell: bash

0 commit comments

Comments
 (0)