diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bfb4e70..fefea554 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e367d0fb..d4afc200 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef228cf3..cd00c121 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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