Skip to content

Commit

Permalink
Merge pull request #1213 from fabratu/20240429_fix_wheels_build
Browse files Browse the repository at this point in the history
CI: Fix faulty wheel build GHA script (split macOS arm64 and x86_64 build)
  • Loading branch information
fabratu committed May 2, 2024
2 parents 22f52d3 + f0a2de7 commit 3e5b2d8
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/build_wheels.yml
Expand Up @@ -100,12 +100,14 @@ jobs:
path: ./wheelhouse/*cp312*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}

cpython-macos-arm64:
name: 'macOS CPython (${{ matrix.cibw_archs }})'
runs-on: macos-latest
cpython-macos:
name: 'macOS CPython (${{ matrix.buildplat[1] }})'
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
cibw_archs: ["universal2"]
buildplat:
- [macos-12, x86_64]
- [macos-latest, arm64]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -120,37 +122,37 @@ jobs:
CIBW_BEFORE_BUILD:
pip install cython &&
brew install libomp ninja
CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs }}
CIBW_ARCHS_MACOS: ${{ matrix.buildplat[1] }}
CIBW_BUILD: ${{ github.ref == 'refs/heads/master' && 'cp38-* cp39-* cp310-* cp311-* cp312-*' || 'cp312-*' }}
CIBW_ENVIRONMENT: CXX='c++'
CIBW_ENVIRONMENT: CXX='c++' NETWORKIT_OSX_CROSSBUILD=ON
CIBW_SKIP: "pp* *-musllinux_*"
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: 'macos-${{ matrix.cibw_archs }}-cp38-${{ github.run_id }}.zip'
name: 'macos-${{ matrix.buildplat[1] }}-cp38-${{ github.run_id }}.zip'
path: ./wheelhouse/*cp38*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: 'macos-${{ matrix.cibw_archs }}-cp39-${{ github.run_id }}.zip'
name: 'macos-${{ matrix.buildplat[1] }}-cp39-${{ github.run_id }}.zip'
path: ./wheelhouse/*cp39*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: 'macos-${{ matrix.cibw_archs }}-cp310-${{ github.run_id }}.zip'
name: 'macos-${{ matrix.buildplat[1] }}-cp310-${{ github.run_id }}.zip'
path: ./wheelhouse/*cp310*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: 'macos-${{ matrix.cibw_archs }}-cp311-${{ github.run_id }}.zip'
name: 'macos-${{matrix.buildplat[1] }}-cp311-${{ github.run_id }}.zip'
path: ./wheelhouse/*cp311*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}
- uses: actions/upload-artifact@v4
with:
name: 'macos-${{ matrix.cibw_archs }}-cp312-${{ github.run_id }}.zip'
name: 'macos-${{ matrix.buildplat[1] }}-cp312-${{ github.run_id }}.zip'
path: ./wheelhouse/*cp312*.whl
retention-days: ${{ env.ARTIFACT_RETENTION }}

Expand Down Expand Up @@ -251,7 +253,7 @@ jobs:
if: needs.check-release-tag.outputs.is-release == 'true' && github.repository == 'networkit/networkit'
name: 'PyPi release upload'
runs-on: ubuntu-20.04
needs: [cpython-macos-x86_64, cpython-linux-aarch64, cpython-linux-x86_64, cpython-windows, source-distribution, check-release-tag]
needs: [cpython-macos, cpython-linux-aarch64, cpython-linux-x86_64, cpython-windows, source-distribution, check-release-tag]
steps:
- uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 3e5b2d8

Please sign in to comment.