Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b64cbe3

Browse files
authoredJul 29, 2024··
add job to upload wheels to continuous pre-release (#1282)
1 parent 3a6911f commit b64cbe3

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed
 

‎.github/workflows/python-package.yml

+48-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
name: shared_library_cuda_${{ matrix.os }}_${{ matrix.arch }}_${{ matrix.cuda_version }}
102102
path: output/*
103103
retention-days: 7
104+
104105
build-wheels:
105106
needs:
106107
- build-shared-libs
@@ -121,7 +122,7 @@ jobs:
121122
runs-on: ${{ matrix.os }}
122123
steps:
123124
- uses: actions/checkout@v4
124-
- name: Download build artifact
125+
- name: Download build artifacts
125126
uses: actions/download-artifact@v4
126127
with:
127128
merge-multiple: true
@@ -152,6 +153,52 @@ jobs:
152153
path: dist/bitsandbytes-*.whl
153154
retention-days: 7
154155

156+
upload-pre-release-wheels:
157+
name: Create release and upload artifacts
158+
runs-on: ubuntu-latest
159+
needs:
160+
- build-wheels
161+
steps:
162+
- name: Download artifacts to tmp directory
163+
uses: actions/download-artifact@v4
164+
with:
165+
path: tmp/
166+
pattern: "bdist_wheel_*"
167+
merge-multiple: true
168+
- name: Inspect tmp directory after downloading artifacts
169+
run: ls -alFR tmp/
170+
- name: Move and rename wheel files
171+
run: |
172+
mkdir -p wheels/
173+
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
174+
wheel_filename=$(basename "$wheel")
175+
if [[ $wheel_filename == *linux*x86_64* ]]; then
176+
mv "$wheel" wheels/bnb-linux-x86_64.whl
177+
elif [[ $wheel_filename == *linux*aarch64* ]]; then
178+
mv "$wheel" wheels/bnb-linux-aarch64.whl
179+
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
180+
mv "$wheel" wheels/bnb-macos-x86_64.whl
181+
elif [[ $wheel_filename == *macosx*arm64* ]]; then
182+
mv "$wheel" wheels/bnb-macos-arm64.whl
183+
elif [[ $wheel_filename == *win*amd64* ]]; then
184+
mv "$wheel" wheels/bnb-windows-x86_64.whl
185+
else
186+
echo "Unknown wheel format: $wheel_filename"
187+
exit 1
188+
fi
189+
done
190+
- name: Inspect wheels directory after renaming files
191+
run: ls -alFR wheels/
192+
- name: Create release and upload artifacts
193+
env:
194+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
195+
GITHUB_CONTINUOUS_RELEASE_TYPE: prerelease
196+
GITHUB_CONTINUOUS_RELEASE_TAG: continuous-release_main
197+
run: |
198+
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
199+
chmod +x pyuploadtool-x86_64.AppImage
200+
./pyuploadtool-x86_64.AppImage --appimage-extract-and-run wheels/*.whl
201+
155202
audit-wheels:
156203
needs: build-wheels
157204
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)
Please sign in to comment.