Skip to content

Commit e483d2f

Browse files
committed
refine CI
1 parent c69a13e commit e483d2f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
tests:
3535
needs: lint
36-
runs-on: ${{ github.event.repository.private == true && 'self-hosted' || 'ubuntu-latest' }}
36+
runs-on: ${{ github.event.repository.private && 'self-hosted' || 'ubuntu-latest' }}
3737
strategy:
3838
matrix:
3939
torch-version: ["2.*"]
@@ -51,6 +51,15 @@ jobs:
5151
run: |
5252
python3 --version
5353
which python3
54+
- name: Disable pip cache
55+
run: |
56+
echo "PIP_NO_CACHE_DIR=1" >> $GITHUB_ENV
57+
echo "PIP_NO_CACHE=1" >> $GITHUB_ENV
58+
- name: Configure torch cache directories
59+
run: |
60+
echo "TORCH_EXTENSIONS_DIR=/tmp/torch_extensions_${GITHUB_RUN_ID}_${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV
61+
echo "TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_${GITHUB_RUN_ID}_${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV
62+
echo "TRITON_CACHE_DIR=/tmp/triton_${GITHUB_RUN_ID}_${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV
5463
- name: Clone NequIP packages
5564
uses: mir-group/nequip-gh-actions/clone@main
5665
with:

0 commit comments

Comments
 (0)