Skip to content

Commit

Permalink
Merge #64
Browse files Browse the repository at this point in the history
64: ci: cache cargo registry & build artifacts r=Urhengulas a=japaric

time savings on cache hit

| Job             | before | after | after/before |
|-----------------|--------|-------|--------------|
| ubuntu-stable   | 105s   | 37s   |          35% |
| macos-stable    | 132s   | 68s   |          51% |
| windows-stable  | 176s   | 98s   |          55% |
| ubuntu-nightly  | 92s    | 40s   |          43% |
| macos-nightly   | 127s   | 65s   |          51% |
| windows-nightly | 163s   | 103s  |          63% |

don't ask me how to replicate the caching steps into the non-matrix job without copy-pasting the whole thing because I don't know :P


Co-authored-by: Jorge Aparicio <[email protected]>
  • Loading branch information
bors[bot] and japaric authored Jan 17, 2022
2 parents d55e7c8 + 128777c commit bb14947
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ env.CORE_TARGET }}
- name: make rustc version available to cache keys
id: rustc
run: echo "::set-output name=version::$(rustc -V)"
- name: cache Cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/cache
~/.cargo/registry/index
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-
- name: cache Cargo build artifacts
uses: actions/cache@v2
with:
path: target
key: cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-
- name: Run testsuite
run: cargo xtest

Expand Down

0 comments on commit bb14947

Please sign in to comment.