From e7f263efa74ebab9b44d162e62e98d60f0ad7c00 Mon Sep 17 00:00:00 2001 From: Florian Dehau Date: Mon, 7 Dec 2020 23:24:32 +0100 Subject: [PATCH] chore(ci): fix cargo-make cache on windows runner --- .github/workflows/ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cec33d..1a4aea8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,12 +26,15 @@ jobs: rust-version: ${{ matrix.rust }} components: rustfmt,clippy - uses: actions/checkout@v1 + - name: "Get cargo bin directory" + id: cargo-bin-dir + run: echo "::set-output name=dir::$HOME/.cargo/bin" - name: "Cache cargo make" id: cache-cargo-make uses: actions/cache@v2 with: - path: ~/.cargo/bin/cargo-make - key: ${{ runner.os }}-${{ matrix.rust }}-${{ env.CI_CARGO_MAKE_VERSION }} + path: ${{ steps.cargo-bin-dir.outputs.dir }}/cargo-make + key: ${{ runner.os }}-${{ matrix.rust }}-cargo-make-${{ env.CI_CARGO_MAKE_VERSION }} - name: "Install cargo-make" if: steps.cache-cargo-make.outputs.cache-hit != 'true' run: cargo install cargo-make --version ${{ env.CI_CARGO_MAKE_VERSION }} @@ -58,12 +61,15 @@ jobs: rust-version: ${{ matrix.rust }} components: rustfmt,clippy - uses: actions/checkout@v1 + - name: "Get cargo bin directory" + id: cargo-bin-dir + run: echo "::set-output name=dir::$HOME\.cargo\bin" - name: "Cache cargo make" id: cache-cargo-make uses: actions/cache@v2 with: - path: ~/.cargo/bin/cargo-make - key: ${{ runner.os }}-${{ matrix.rust }}-${{ env.CI_CARGO_MAKE_VERSION }} + path: ${{ steps.cargo-bin-dir.outputs.dir }}\cargo-make.exe + key: ${{ runner.os }}-${{ matrix.rust }}-cargo-make-${{ env.CI_CARGO_MAKE_VERSION }} - name: "Install cargo-make" if: steps.cache-cargo-make.outputs.cache-hit != 'true' run: cargo install cargo-make --version ${{ env.CI_CARGO_MAKE_VERSION }}