Skip to content

Commit 148c3c8

Browse files
committed
Use toolcache for more commands
1 parent d912bf5 commit 148c3c8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci_linux.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
runs-on: ${{ matrix.variance.runner }}
2727
container:
2828
image: ${{ matrix.variance.image }}
29+
env:
30+
CARGO_TARGET_DIR: ${{ runner.tool_cache }}/cargo-target
31+
DOC_CARGO_TARGET_DIR: ${{ runner.tool_cache }}/cargo-doc
2932
strategy:
3033
fail-fast: false
3134
matrix:
@@ -94,23 +97,25 @@ jobs:
9497
- name: Check documentation
9598
env:
9699
RUSTDOCFLAGS: -Dwarnings
97-
CARGO_TARGET_DIR: ${{ runner.tool_cache }}/cargo-doc
100+
CARGO_TARGET_DIR: ${{ env.DOC_CARGO_TARGET_DIR }}
98101
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex0*" --exclude "cudnn*" --exclude "cust_raw"
99102

100103
- name: Prepare artifact details
101104
id: artifact_details
102105
run: |
103106
SANITIZED_NAME=$(echo '${{ matrix.variance.name }}' | sed 's/[^a-zA-Z0-9.-]/-/g')
104107
ARTIFACT_NAME="target_debug-${SANITIZED_NAME}-${{ github.run_id }}"
105-
ARTIFACT_PATH="target/debug"
108+
ARTIFACT_UPLOAD_PATH="${CARGO_TARGET_DIR}/debug"
109+
ARTIFACT_PATH="target-debug/${SANITIZED_NAME}-${{ github.run_id }}"
110+
echo "upload_path=${ARTIFACT_UPLOAD_PATH}" >> $GITHUB_OUTPUT
106111
echo "name=${ARTIFACT_NAME}" >> $GITHUB_OUTPUT
107112
echo "path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
108113
109114
- name: Upload build artifacts
110115
uses: actions/upload-artifact@v4
111116
with:
112117
name: ${{ steps.artifact_details.outputs.name }}
113-
path: ${{ steps.artifact_details.outputs.path }}
118+
path: ${{ steps.artifact_details.outputs.upload_path }}
114119
retention-days: 1
115120

116121
test:

0 commit comments

Comments
 (0)