Skip to content

Commit

Permalink
fix: reduce size and resolve windows issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Oct 5, 2024
1 parent f7352bb commit 06b48d9
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,17 @@ jobs:
rm -rf python/include
rm -rf python/share
find python/ -type d -name "tests" -exec rm -rf {} +
find python/ -type d -name "__pycache__" -exec rm -rf {} +
- name: Strip (CUDA)
run: |
strip -s python/lib/python3.11/site-packages/triton/_C/libtriton.so
if: matrix.build.type == 'cuda'

- name: Build artifact
run: cd python && tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
run: |
cd python
tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -112,7 +115,7 @@ jobs:
runs-on: windows-latest
env:
artifact_name: win32-${{ matrix.build.arch }}-${{ matrix.build.type }}.tar.br
python_url: 'https://github.com/indygreg/python-build-standalone/releases/download/20241002/cpython-3.11.10+20241002-i686-pc-windows-msvc-install_only_stripped.tar.gz'
python_url: 'https://github.com/indygreg/python-build-standalone/releases/download/20241002/cpython-3.10.15+20241002-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz'
pip_args: ${{ matrix.build.pip_args }} -r requirements.${{ matrix.build.type }}.txt
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -148,9 +151,12 @@ jobs:
rm -r -fo python/share
Remove-Item 'python\*' -Recurse -Include *.pdb
Remove-Item 'python\*' -Recurse -Include *.lib
Get-ChildItem -path python -Include '__pycache__' -Recurse -force | Remove-Item -force -Recurse
- name: Build artifact
run: cd python && tar -cf - * | brotli -6 > C:\WINDOWS\Temp\${{ env.artifact_name }}
run: |
cd python
tar -cf - * | brotli -6 > C:\WINDOWS\Temp\${{ env.artifact_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -204,9 +210,12 @@ jobs:
rm -rf python/include
rm -rf python/share
find python/ -type d -name "tests" -exec rm -rf {} +
find python/ -type d -name "__pycache__" -exec rm -rf {} +
- name: Build artifact
run: cd python && tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
run: |
cd python
tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -260,9 +269,12 @@ jobs:
rm -rf python/include
rm -rf python/share
find python/ -type d -name "tests" -exec rm -rf {} +
find python/ -type d -name "__pycache__" -exec rm -rf {} +
- name: Build artifact
run: cd python && tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
run: |
cd python
tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 06b48d9

Please sign in to comment.