Purge self-runner's pip cache weekly (#975)

This commit is contained in:
Liangsheng Yin
2024-08-07 12:43:12 -07:00
committed by GitHub
parent dc9d06d886
commit fbe0c818c2
3 changed files with 26 additions and 2 deletions

26
.github/workflows/cache-purge.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Weekly Cache Purge
on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at 00:00
workflow_dispatch:
jobs:
purge-cache:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Purge pip cache
run: |
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
- name: Update dependencies
run: |
pip install --upgrade pip
pip install -e "python[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall

View File

@@ -31,7 +31,6 @@ jobs:
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
pip install --upgrade pip
pip install -e "python[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall

View File

@@ -31,7 +31,6 @@ jobs:
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
pip install --upgrade pip
pip install -e "python[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall