Skip to content

Commit

Permalink
Enable continuous releases for multi-backend-refactor branch
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdouglas committed Sep 26, 2024
1 parent 0d3d977 commit e72637c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,56 @@ jobs:
path: dist/bitsandbytes-*.whl
retention-days: 7

upload-pre-release-wheels:
name: Create release and upload artifacts
runs-on: ubuntu-latest
if: github.ref_name == 'multi-backend-refactor'
permissions:
contents: write
needs:
- build-wheels
steps:
- name: Download artifacts to tmp directory
uses: actions/download-artifact@v4
with:
path: tmp/
pattern: "bdist_wheel_*"
merge-multiple: true
- name: Inspect tmp directory after downloading artifacts
run: ls -alFR tmp/
- name: Move and rename wheel files
run: |
mkdir -p wheels/
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
wheel_filename=$(basename "$wheel")
if [[ $wheel_filename == *linux*x86_64* ]]; then
mv "$wheel" wheels/bnb-linux-x86_64.whl
elif [[ $wheel_filename == *linux*aarch64* ]]; then
mv "$wheel" wheels/bnb-linux-aarch64.whl
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
mv "$wheel" wheels/bnb-macos-x86_64.whl
elif [[ $wheel_filename == *macosx*arm64* ]]; then
mv "$wheel" wheels/bnb-macos-arm64.whl
elif [[ $wheel_filename == *win*amd64* ]]; then
mv "$wheel" wheels/bnb-windows-x86_64.whl
else
echo "Unknown wheel format: $wheel_filename"
exit 1
fi
done
- name: Inspect wheels directory after renaming files
run: ls -alFR wheels/
- name: Create release and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTINUOUS_RELEASE_NAME: Multi-Backend Preview
GITHUB_CONTINUOUS_RELEASE_TYPE: prerelease
GITHUB_CONTINUOUS_RELEASE_TAG: continuous-release_preview
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage --appimage-extract-and-run wheels/*.whl
audit-wheels:
needs: build-wheels
runs-on: ubuntu-latest
Expand Down

0 comments on commit e72637c

Please sign in to comment.