Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved linux/aarch64 build Python wheel build to native Github runners #2162

Merged
merged 6 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 36 additions & 7 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ jobs:
python -m pytest

build_wheel_linux:
# ubuntu 22 has a latest version of cmake, but setup-python
# does not seem to provide all necessary modules to find python
# from cmake. works on my machine, test the wheels manually
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python: [3.11]
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ matrix.python }}

- name: Build wheel
run: |
python3 --version
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp310-manylinux_x86_64 $GITHUB_WORKSPACE
python3 -m cibuildwheel --only cp311-manylinux_x86_64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
Expand All @@ -102,7 +102,36 @@ jobs:
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE


build_wheel_linux_arm:
runs-on: ubuntu-24.04-arm
strategy:
matrix:
python: [3.11]
steps:
- uses: actions/checkout@v4

- name: Install python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Build wheel
run: |
python3 --version
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp311-manylinux_aarch64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
python3 -m pip install wheelhouse/*.whl

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE

# macos 13 is Intel
build_wheel_macos_13:
runs-on: macos-13
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/build-wheels-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, manylinux_i686]
- [ubuntu-20.04, manylinux_aarch64]
- [ubuntu-20.04, musllinux_x86_64] # No OpenBlas, no test
- [ubuntu-20.04, musllinux_i686]
- [ubuntu-20.04, musllinux_aarch64]
- [ubuntu-24.04, manylinux_x86_64]
- [ubuntu-24.04, manylinux_i686]
- [ubuntu-24.04-arm, manylinux_aarch64]
- [ubuntu-24.04, musllinux_x86_64] # No OpenBlas, no test
- [ubuntu-24.04, musllinux_i686]
- [ubuntu-24.04-arm, musllinux_aarch64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-2019, win_amd64]
Expand All @@ -58,21 +58,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up QEMU # Required for aarch64 builds
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels (aarch64)
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: pypa/cibuildwheel@v2.21
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ARCHS_LINUX: aarch64

- name: Build wheels (not aarch64)
if: ${{ !contains(matrix.buildplat[1], 'aarch64') }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.21
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, manylinux_i686]
- [ubuntu-20.04, manylinux_aarch64]
- [ubuntu-20.04, musllinux_x86_64] # No OpenBlas, no test
- [ubuntu-20.04, musllinux_i686]
- [ubuntu-20.04, musllinux_aarch64]
- [ubuntu-24.04, manylinux_x86_64]
- [ubuntu-24.04, manylinux_i686]
- [ubuntu-24.04-arm, manylinux_aarch64]
- [ubuntu-24.04, musllinux_x86_64] # No OpenBlas, no test
- [ubuntu-24.04, musllinux_i686]
- [ubuntu-24.04-arm, musllinux_aarch64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-2019, win_amd64]
Expand All @@ -46,21 +46,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up QEMU # Required for aarch64 builds
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels (aarch64)
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: pypa/cibuildwheel@v2.21
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ARCHS_LINUX: aarch64

- name: Build wheels (not aarch64)
if: ${{ !contains(matrix.buildplat[1], 'aarch64') }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.21
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
Loading