Skip to content

Commit

Permalink
build: set CARGO_HOME and CARGO_TARGET_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
LightAndLight committed Jan 16, 2024
1 parent 1beff27 commit 37a43de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ jobs:

- name: "tests"
if: github.event_name == 'pull_request'
run: >
nix develop .#tests
--post-build-hook "$RUNNER_TEMP/postBuildHook-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER"
-c ./scripts/recheck origin/$GITHUB_BASE_REF $GITHUB_REF_NAME
run: |
export CARGO_HOME=/var/cache/github-runner/.cargo
export CARGO_TARGET_DIR=$(realpath --relative-to "$PWD" /var/cache/github-runner/target)
nix develop .#tests \
--post-build-hook "$RUNNER_TEMP/postBuildHook-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER" \
-c ./scripts/recheck origin/$GITHUB_BASE_REF $GITHUB_REF_NAME
# `tests.yml` is currently set to run on pushes to `main`. When that happens, `$GITHUB_BASE_REF`
# isn't set because it's not a pull request. Instead we use the most recent commit before the
Expand Down

0 comments on commit 37a43de

Please sign in to comment.