diff options
author | Tom Milligan <tom.milligan@uipath.com> | 2024-05-24 15:05:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-24 15:05:19 +0100 |
commit | 8fa14110952fe01c64890e2991c047be1967bf87 (patch) | |
tree | 17aa21dce6d1e13f0a296abb3e8adce8df887f46 | |
parent | 48053983597171fe6bdfbc5a047298b3a3309997 (diff) | |
parent | a1e5cfa48d414302d2ba11cdfd0e5ab0b8fd5160 (diff) |
Merge pull request #184 from tommilligan/fix-cargo-target-dir-release
ci: be more limited with CARGO_TARGET_DIR
-rw-r--r-- | .github/workflows/check.yml | 10 | ||||
-rw-r--r-- | .github/workflows/deploy.yml | 12 | ||||
-rw-r--r-- | .github/workflows/docs.yml | 6 |
3 files changed, 8 insertions, 20 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e33b8c8..e13b3c3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,8 +7,6 @@ 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 @@ -19,7 +17,6 @@ jobs: ~/.cargo/registry ~/.cargo/git target - /tmp/cargo-install-target-dir key: fast-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Install toolchain uses: dtolnay/rust-toolchain@master @@ -35,8 +32,6 @@ 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 @@ -63,7 +58,7 @@ jobs: cache-dependency-path: compile_assets/yarn.lock - name: Install additional test dependencies env: - CARGO_TARGET_DIR: cargo_target + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" run: ./scripts/install - name: Run check script run: ./scripts/check @@ -99,8 +94,6 @@ 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 @@ -117,7 +110,6 @@ 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: dtolnay/rust-toolchain@master diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5ba6182..87330f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,8 +37,6 @@ 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 @@ -47,20 +45,18 @@ jobs: - name: Setup | Cache Cargo uses: actions/cache@v4 with: + # Note that we don't cache the `target` directory here + # so we do a completely clean rebuild for artefacts path: | ~/.cargo/registry ~/.cargo/git - /tmp/cargo-install-target-dir key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Setup | Rust uses: dtolnay/rust-toolchain@master with: toolchain: stable - targets: ${{ matrix.target }} - - - name: Create target directory - run: mkdir target + target: ${{ matrix.target }} - name: Setup | cross if: endsWith(matrix.target, '-unknown-linux-musl') @@ -137,7 +133,6 @@ jobs: 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@v4 @@ -147,7 +142,6 @@ jobs: ~/.cargo/git target ~/.cargo/bin - /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 ce38af0..28239d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,8 +12,6 @@ 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@v4 @@ -31,8 +29,12 @@ jobs: with: toolchain: stable - name: Install mdbook + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" run: ./scripts/install-mdbook - name: Install mdbook extras + env: + CARGO_TARGET_DIR: "/tmp/cargo-install-target-dir" run: ./book/scripts/install-mdbook-extras - name: Build book run: ./scripts/build-book |