diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ff8c5ec3f6..ec6689924f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,10 +1,13 @@ name: Build Wheels on: - push: pull_request: branches: - master + release: + types: [published] + workflow_dispatch: + jobs: build_wheels: @@ -14,6 +17,28 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + fetch-depth: 0 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.17 + env: + CIBW_ARCHS: auto64 + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl + + build_arm64_wheels: + # Emulation takes a long time so we save it for release/manual triggering + name: Build arm64 wheels via emulation + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: - uses: actions/checkout@v4 with: @@ -29,9 +54,10 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.17 env: - CIBW_ARCHS_LINUX: auto64 aarch64 + CIBW_ARCHS_LINUX: aarch64 - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + name: cibw-wheels-arm64 path: ./wheelhouse/*.whl +