Skip to content

Commit a63a7c1

Browse files
committed
chore: further cleanup
1 parent 75cfc81 commit a63a7c1

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
python_url: 'https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9+20240415-x86_64_v3-unknown-linux-gnu-install_only.tar.gz'
2727
pip_args: ${{ matrix.build.pip_args }} -r requirements.${{ matrix.build.type }}.txt
2828
steps:
29-
- name: Check disk space
30-
run: df -h
31-
3229
- name: Remove unnecessary files
3330
run: |
3431
sudo rm -rf \
@@ -37,17 +34,16 @@ jobs:
3734
/opt/microsoft/msedge \
3835
/opt/microsoft/powershell \
3936
/opt/pipx \
37+
/opt/ghc \
38+
/opt/hostedtoolcache/CodeQL \
4039
/usr/lib/mono \
4140
/usr/local/julia* \
4241
/usr/local/lib/android \
43-
/usr/local/lib/node_modules \
4442
/usr/local/share/chromium \
4543
/usr/local/share/powershell \
4644
/usr/share/dotnet \
4745
/usr/share/swift
48-
49-
- name: Check disk space
50-
run: df -h
46+
sudo docker image prune --all --force
5147
5248
- uses: actions/checkout@v4
5349

@@ -76,7 +72,18 @@ jobs:
7672
run: ./python/bin/python -m pip install --no-compile ${{ env.pip_args }}
7773

7874
- name: Clean up
79-
run: rm -rf python/lib/python3.11/site-packages/torch/include && rm -rf python/include && rm -rf python/share
75+
run: |
76+
rm -rf python/lib/python3.11/site-packages/torch/test
77+
rm -rf python/lib/python3.11/site-packages/torch/bin/test_*
78+
rm -rf python/lib/python3.11/site-packages/torch/include
79+
rm -rf python/include
80+
rm -rf python/share
81+
find python/ -type d -name "tests" -exec rm -rf {} +
82+
83+
- name: Strip (CUDA)
84+
run: |
85+
strip -s python/lib/python3.11/site-packages/triton/_C/libtriton.so
86+
if: matrix.build.type == 'cuda'
8087

8188
- name: Build artifact
8289
run: cd python && tar -cf - * | zstd -9 -T0 > /tmp/${{ env.artifact_name }}
@@ -135,7 +142,12 @@ jobs:
135142
run: .\python\python.exe -m pip install --no-compile ${{ env.pip_args }}
136143

137144
- name: Clean up
138-
run: rm -r -fo python/Lib/site-packages/torch/include && rm -r -fo python/include && rm -r -fo python/share
145+
run: |
146+
rm -r -fo python/Lib/site-packages/torch/include
147+
rm -r -fo python/include
148+
rm -r -fo python/share
149+
Remove-Item 'python\*' -Recurse -Include *.pdb
150+
Remove-Item 'python\*' -Recurse -Include *.lib
139151
140152
- name: Build artifact
141153
run: cd python && tar -cf - * | zstd -9 -T0 > C:\WINDOWS\Temp\${{ env.artifact_name }}
@@ -187,7 +199,11 @@ jobs:
187199
run: ./python/bin/python -m pip install --no-compile ${{ env.pip_args }}
188200

189201
- name: Clean up
190-
run: rm -rf python/lib/python3.11/site-packages/torch/include && rm -rf python/include && rm -rf python/share
202+
run: |
203+
rm -rf python/lib/python3.11/site-packages/torch/include
204+
rm -rf python/include
205+
rm -rf python/share
206+
find python/ -type d -name "tests" -exec rm -rf {} +
191207
192208
- name: Build artifact
193209
run: cd python && tar -cf - * | zstd -9 -T1 > /tmp/${{ env.artifact_name }}
@@ -239,7 +255,11 @@ jobs:
239255
run: ./python/bin/python -m pip install --no-compile ${{ env.pip_args }}
240256

241257
- name: Clean up
242-
run: rm -rf python/lib/python3.11/site-packages/torch/include && rm -rf python/include && rm -rf python/share
258+
run: |
259+
rm -rf python/lib/python3.11/site-packages/torch/include
260+
rm -rf python/include
261+
rm -rf python/share
262+
find python/ -type d -name "tests" -exec rm -rf {} +
243263
244264
- name: Build artifact
245265
run: cd python && tar -cf - * | zstd -9 -T1 > /tmp/${{ env.artifact_name }}

0 commit comments

Comments
 (0)