From 8f402f31da55ffcb0242a0056be6dc0549b7ce2d Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sat, 18 Dec 2021 09:03:34 +0000 Subject: [PATCH] ci: try rust-cache action --- .github/workflows/ci.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c054264..afffe874 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,23 +121,6 @@ jobs: steps: - uses: actions/checkout@v2 - # macos: install gnu-tar because BSD tar is buggy for github actions - # https://github.com/actions/cache/issues/403 - - name: Install GNU tar (macOS only) - if: matrix.platform.os == 'macos-latest' - run: | - brew install gnu-tar - echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - - - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: cargo-${{ matrix.python-version }}-${{ matrix.platform.python-architecture }}-${{ matrix.platform.os }}-${{ matrix.msrv }}-${{ hashFiles('**/Cargo.toml') }} - continue-on-error: true - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -154,6 +137,11 @@ jobs: # needed to correctly format errors, see #1865 components: rust-src + - uses: Swatinem/rust-cache@v1 + with: + key: cargo-${{ matrix.platform.python-architecture }}-${{ matrix.platform.os }}-${{ matrix.msrv }} + continue-on-error: true + - if: matrix.platform.os == 'ubuntu-latest' name: Prepare LD_LIBRARY_PATH (Ubuntu only) run: echo LD_LIBRARY_PATH=${pythonLocation}/lib >> $GITHUB_ENV @@ -266,13 +254,9 @@ jobs: - uses: actions/setup-python@v2 with: python-version: "3.10" - - uses: actions/cache@v2 + - uses: Swatinem/rust-cache@v1 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: coverage-cargo-${{ hashFiles('**/Cargo.toml') }} + key: coverage-cargo-${{ matrix.os }} continue-on-error: true - uses: actions-rs/toolchain@v1 with: