1
0
Fork 0

Cache target/ on non-Windows platforms

This commit is contained in:
Robbert van der Helm 2022-11-09 19:54:05 +01:00
parent e6c43e35d3
commit 2948c2589d
3 changed files with 30 additions and 0 deletions

View file

@ -42,11 +42,21 @@ jobs:
- uses: actions/cache@v2
with:
# FIXME: Caching `target/` causes the Windows runner to blow up after some time
if: startsWith(matrix.os, 'windows')
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- uses: actions/cache@v2
with:
if: "!startsWith(matrix.os, 'windows')"
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1

View file

@ -28,11 +28,21 @@ jobs:
- uses: actions/cache@v2
with:
# FIXME: Caching `target/` causes the Windows runner to blow up after some time
if: startsWith(matrix.os, 'windows')
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- uses: actions/cache@v2
with:
if: "!startsWith(matrix.os, 'windows')"
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1

View file

@ -39,11 +39,21 @@ jobs:
- uses: actions/cache@v2
with:
# FIXME: Caching `target/` causes the Windows runner to blow up after some time
if: startsWith(matrix.os, 'windows')
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- uses: actions/cache@v2
with:
if: "!startsWith(matrix.os, 'windows')"
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.name }}-${{ matrix.cross-target }}
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1