diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b04fb90..7911f6b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,6 +7,8 @@ jobs: fast-test: name: Fast test runs-on: ubuntu-20.04 + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: - name: Checkout sources uses: actions/checkout@v4 @@ -17,6 +19,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target + /tmp/cargo-install-target-dir key: fast-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain uses: actions-rs/toolchain@v1 @@ -33,6 +36,8 @@ jobs: needs: fast-test name: Test main target runs-on: ubuntu-20.04 + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: - name: Checkout sources uses: actions/checkout@v4 @@ -44,7 +49,7 @@ jobs: ~/.cargo/git target ~/.cargo/bin - cargo_target + /tmp/cargo-install-target-dir key: detailed-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain uses: actions-rs/toolchain@v1 @@ -95,6 +100,8 @@ jobs: experimental: false runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: # This is required, otherwise we get files with CRLF on Windows # Which causes tests relying on data loaded from files to fail @@ -111,6 +118,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target + /tmp/cargo-install-target-dir key: test-${{ matrix.os }}-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b8d1388..5b0088e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,6 +37,8 @@ jobs: os: windows-latest name: x86_64-pc-windows-msvc.zip runs-on: ${{ matrix.os }} + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: - name: Setup | Checkout uses: actions/checkout@v4 @@ -48,6 +50,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + /tmp/cargo-install-target-dir key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Setup | Rust @@ -132,6 +135,8 @@ jobs: name: Publish to crates.io needs: github_release runs-on: ubuntu-20.04 + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: - uses: actions/checkout@v4 - uses: actions/cache@v3 @@ -141,7 +146,7 @@ jobs: ~/.cargo/git target ~/.cargo/bin - cargo_target + /tmp/cargo-install-target-dir # We reuse the cache from our detailed test environment, if available key: detailed-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 270c3e8..9611e48 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,6 +12,8 @@ permissions: jobs: publish: runs-on: ubuntu-20.04 + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" steps: - uses: actions/checkout@v4 - uses: actions/cache@v3 @@ -21,7 +23,7 @@ jobs: ~/.cargo/git target ~/.cargo/bin - cargo_target + /tmp/cargo-install-target-dir # We reuse the cache from our detailed test environment, if available key: detailed-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain