-
Notifications
You must be signed in to change notification settings - Fork 0
Clean up part 1 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up part 1 #21
Changes from 26 commits
88aca83
6dac922
0efa213
70d39d2
02e869f
360d689
633c5d9
b8a5984
842341f
c806ec4
ce8d5fc
554ed11
61aa093
d34df8c
1934775
05b7154
f435da6
5ebf2f8
9131b8c
00ecd02
ed9e84e
d5a9c17
ba0186a
4d5e1f3
48ca358
2faebdb
494fd46
59a3d36
4c94d9c
97114a8
ab9d754
9300d4b
bea4e53
98f63c8
f14ffe4
2e07e3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,20 +26,38 @@ jobs: | |
| uses: actions/cache@v3 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
| key: ${{ runner.os }}-pip-ci-${{ hashFiles('**/requirements-ci.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| ${{ runner.os }}-pip-ci- | ||
|
|
||
| - name: Free up disk space | ||
| run: | | ||
| # Remove unnecessary packages and clean up | ||
| sudo rm -rf /usr/share/dotnet | ||
| sudo rm -rf /usr/local/lib/android | ||
| sudo rm -rf /opt/ghc | ||
| sudo rm -rf /opt/hostedtoolcache/CodeQL | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| df -h | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y ffmpeg libsndfile1 | ||
| sudo apt-get clean | ||
| sudo rm -rf /var/lib/apt/lists/* | ||
|
|
||
| - name: Install Python dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install pytest pytest-cov pytest-mock | ||
| # Use CI requirements with CPU-only PyTorch to save space | ||
| pip install --no-cache-dir -r requirements-ci.txt | ||
| pip install --no-cache-dir pytest pytest-cov pytest-mock | ||
|
|
||
| - name: Clean up pip cache | ||
| run: | | ||
| pip cache purge || true | ||
|
Comment on lines
50
to
+59
|
||
| df -h | ||
|
|
||
| - name: Run unit tests | ||
| run: | | ||
|
|
@@ -123,11 +141,27 @@ jobs: | |
| with: | ||
| python-version: '3.9' | ||
|
|
||
| - name: Free up disk space | ||
| run: | | ||
| # Remove unnecessary packages and clean up | ||
| sudo rm -rf /usr/share/dotnet | ||
| sudo rm -rf /usr/local/lib/android | ||
| sudo rm -rf /opt/ghc | ||
| sudo rm -rf /opt/hostedtoolcache/CodeQL | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| df -h | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install pytest pytest-mock requests | ||
| # Use CI requirements with CPU-only PyTorch to save space | ||
| pip install --no-cache-dir -r requirements-ci.txt | ||
| pip install --no-cache-dir pytest pytest-mock requests | ||
|
|
||
| - name: Clean up pip cache | ||
| run: | | ||
| pip cache purge || true | ||
| df -h | ||
|
|
||
| - name: Start API server in background | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,16 +20,34 @@ jobs: | |||||||||||||
| with: | ||||||||||||||
| python-version: '3.9' | ||||||||||||||
|
|
||||||||||||||
| - name: Free up disk space | ||||||||||||||
| run: | | ||||||||||||||
| # Remove unnecessary packages and clean up | ||||||||||||||
| sudo rm -rf /usr/share/dotnet | ||||||||||||||
| sudo rm -rf /usr/local/lib/android | ||||||||||||||
| sudo rm -rf /opt/ghc | ||||||||||||||
| sudo rm -rf /opt/hostedtoolcache/CodeQL | ||||||||||||||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||||||||||||||
| df -h | ||||||||||||||
|
|
||||||||||||||
| - name: Install system dependencies | ||||||||||||||
| run: | | ||||||||||||||
| sudo apt-get update | ||||||||||||||
| sudo apt-get install -y ffmpeg libsndfile1 | ||||||||||||||
| sudo apt-get clean | ||||||||||||||
| sudo rm -rf /var/lib/apt/lists/* | ||||||||||||||
|
|
||||||||||||||
| - name: Install all dependencies | ||||||||||||||
| run: | | ||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||
| pip install -r requirements.txt | ||||||||||||||
| pip install pytest pytest-cov pytest-html pytest-xdist | ||||||||||||||
| # Use CI requirements with CPU-only PyTorch to save space | ||||||||||||||
| pip install --no-cache-dir -r requirements-ci.txt | ||||||||||||||
| pip install --no-cache-dir pytest pytest-cov pytest-html pytest-xdist | ||||||||||||||
|
|
||||||||||||||
| - name: Clean up pip cache | ||||||||||||||
| run: | | ||||||||||||||
| pip cache purge || true | ||||||||||||||
| df -h | ||||||||||||||
|
|
||||||||||||||
|
Comment on lines
+49
to
51
|
||||||||||||||
| pip cache purge || true | |
| df -h | |
| df -h | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ credentials/ | |
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.code-workspace | ||
| *.swp | ||
| *.swo | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
--no-cache-dirinstalls, there is typically little to purge from the pip cache. If the goal is to reduce disk usage, this step may be unnecessary; if the goal is to speed up runs, consider caching instead of purging.