File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,27 @@ jobs:
40
40
steps :
41
41
- name : Check out
42
42
uses : actions/checkout@v3
43
- - name : Install Rust
43
+ - name : Set up rustup cache
44
+ uses : actions/cache@v3
45
+ continue-on-error : false
46
+ with :
47
+ path : |
48
+ ~/.rustup/downloads
49
+ ~/.rustup/toolchains
50
+ key : ${{ runner.os }}-rustup-${{ inputs.rust-version }}-${{ inputs.rust-target }}-${{ hashFiles('**/rustup-toolchain.toml') }}
51
+ # The effect of this is must smaller than the cache for Cargo. However, it
52
+ # still saves a few seconds. Note that many CI runs within a week may
53
+ # quickly bring you close to the 10GB limit:
54
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches
55
+ - name : Install Rust Toolchain via Rustup
44
56
uses : actions-rs/toolchain@v1
45
57
with :
46
58
profile : minimal
47
59
toolchain : ${{ inputs.rust-version }}
48
60
override : true
49
61
components : clippy, rustfmt
50
62
target : ${{ inputs.rust-target }}
51
- - name : Set up cargo cache
63
+ - name : Set up Cargo cache
52
64
uses : actions/cache@v3
53
65
continue-on-error : false
54
66
with :
60
72
target/
61
73
# We do not have a Cargo.lock here, so I hash Cargo.toml
62
74
key : ${{ runner.os }}-rust-${{ inputs.rust-version }}-cargo-${{ hashFiles('**/Cargo.toml') }}
63
- restore-keys : ${{ runner.os }}-cargo-${{ inputs.rust-version }}
64
75
- run : cargo version
65
76
- name : Build (library)
66
77
run : cargo build --target ${{ inputs.rust-target }} --features ${{ inputs.features }}
You can’t perform that action at this time.
0 commit comments