File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,28 @@ jobs:
4040 steps :
4141 - name : Check out
4242 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+ key : ${{ runner.os }}-rustup-${{ inputs.rust-version }}-${{ inputs.rust-target }}
52+ # The effect of this is must smaller than the cache for Cargo. However, it
53+ # still saves a few seconds. Note that many CI runs within a week may
54+ # quickly bring you close to the 10GB limit:
55+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches
56+ - name : Install Rust Toolchain via Rustup
4457 uses : actions-rs/toolchain@v1
4558 with :
4659 profile : minimal
4760 toolchain : ${{ inputs.rust-version }}
4861 override : true
4962 components : clippy, rustfmt
5063 target : ${{ inputs.rust-target }}
51- - name : Set up cargo cache
64+ - name : Set up Cargo cache
5265 uses : actions/cache@v3
5366 continue-on-error : false
5467 with :
6073 target/
6174 # We do not have a Cargo.lock here, so I hash Cargo.toml
6275 key : ${{ runner.os }}-rust-${{ inputs.rust-version }}-cargo-${{ hashFiles('**/Cargo.toml') }}
63- restore-keys : ${{ runner.os }}-cargo-${{ inputs.rust-version }}
6476 - run : cargo version
6577 - name : Build (library)
6678 run : cargo build --target ${{ inputs.rust-target }} --features ${{ inputs.features }}
You can’t perform that action at this time.
0 commit comments