Merge pull request #56 from PalamaraLab/55-check-version-consistent #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build python wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build_wheels_cloud: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| if: github.event_name == 'pull_request' || github.repository == 'PalamaraLab/arg-needle-lib' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| arch: x86_64 | |
| py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* | |
| py-vers-pr: cp311-* | |
| before-all: | | |
| dnf -y install boost-devel eigen3-devel wget | |
| dnf -y install epel-release | |
| dnf -y install hdf5-devel | |
| extra-env: "" | |
| mdt: "" | |
| - os: ubuntu-24.04-arm | |
| arch: aarch64 | |
| py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* | |
| py-vers-pr: cp312-* | |
| before-all: | | |
| dnf -y install boost-devel eigen3-devel wget | |
| dnf -y install epel-release | |
| dnf -y install hdf5-devel | |
| extra-env: "" | |
| mdt: "" | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* | |
| py-vers-pr: cp313-* | |
| before-all: brew install boost eigen hdf5 | |
| extra-env: CC=clang CXX=clang++ | |
| mdt: 15.0 | |
| - os: macos-14 | |
| arch: arm64 | |
| py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* | |
| py-vers-pr: cp314-* | |
| before-all: brew install boost eigen hdf5 | |
| extra-env: CC=clang CXX=clang++ | |
| mdt: 14.0 | |
| env: | |
| CIBW_BUILD: ${{ github.event_name != 'pull_request' && matrix.py-vers-full || matrix.py-vers-pr }} | |
| CIBW_SKIP: cp3*-musllinux_* | |
| CIBW_ARCHS: ${{ matrix.arch }} | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
| CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | |
| CIBW_BEFORE_ALL: ${{ matrix.before-all }} | |
| CIBW_BEFORE_BUILD: pip install --upgrade pip setuptools wheel ninja numpy cython | |
| CIBW_ENVIRONMENT: ${{ matrix.extra-env }} | |
| MACOSX_DEPLOYMENT_TARGET: ${{ matrix.mdt }} | |
| steps: | |
| - name: checkout repo & submodules | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.2.0 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-cloud-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| retention-days: 1 | |
| upload_all: | |
| name: Upload to PyPI | |
| needs: [build_wheels_cloud] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'release' && github.event.action == 'published' && github.repository == 'PalamaraLab/arg-needle-lib' }} | |
| steps: | |
| - name: Download wheels from cloud runners | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: wheels-cloud-* | |
| merge-multiple: true | |
| path: wheels | |
| - uses: pypa/gh-action-pypi-publish@v1.13.0 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| packages_dir: wheels/ |