From 84b24b233dab91d353d042139667a5c535e848e3 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Fri, 25 Jul 2025 00:15:53 -0700 Subject: [PATCH] feat: add cibuildwheel option to release workflow - Add optional use_cibuildwheel parameter to release workflow - Create separate CI workflow for testing cibuildwheel - Support conditional build workflow selection in release process - This allows building wheels compatible with Google Colab and older systems - Maintains backward compatibility with existing build process --- .github/workflows/ci-cibuildwheel.yml | 12 ++++++++++++ .github/workflows/release-manual.yml | 21 ++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci-cibuildwheel.yml diff --git a/.github/workflows/ci-cibuildwheel.yml b/.github/workflows/ci-cibuildwheel.yml new file mode 100644 index 0000000..88f97d1 --- /dev/null +++ b/.github/workflows/ci-cibuildwheel.yml @@ -0,0 +1,12 @@ +name: CI - cibuildwheel (Test) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: # Allow manual triggering + +jobs: + build: + uses: ./.github/workflows/build-cibuildwheel.yml \ No newline at end of file diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index 6623f44..200963d 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -7,6 +7,11 @@ on: description: 'Version to release (e.g., 0.1.2)' required: true type: string + use_cibuildwheel: + description: 'Use cibuildwheel for better compatibility (recommended for Colab)' + required: false + type: boolean + default: false jobs: update-version: @@ -42,16 +47,26 @@ jobs: echo "commit-sha=$COMMIT_SHA" >> $GITHUB_OUTPUT echo "✅ Pushed version update: $COMMIT_SHA" - build-packages: - name: Build packages + build-packages-reusable: + name: Build packages (Standard) needs: update-version + if: ${{ !inputs.use_cibuildwheel }} uses: ./.github/workflows/build-reusable.yml with: ref: ${{ needs.update-version.outputs.commit-sha }} + + build-packages-cibuildwheel: + name: Build packages (cibuildwheel) + needs: update-version + if: ${{ inputs.use_cibuildwheel }} + uses: ./.github/workflows/build-cibuildwheel.yml + with: + ref: ${{ needs.update-version.outputs.commit-sha }} publish: name: Publish and Release - needs: build-packages + needs: [update-version, build-packages-reusable, build-packages-cibuildwheel] + if: always() && needs.update-version.result == 'success' && (needs.build-packages-reusable.result == 'success' || needs.build-packages-cibuildwheel.result == 'success') runs-on: ubuntu-latest permissions: contents: write