Skip to content

Commit

Permalink
github/workflows/cibuildwheel.yml: Add ubuntu aarch64 (#196)
Browse files Browse the repository at this point in the history
* github/workflows/cibuildwheel.yml: Add ubuntu arm64

* Update cibuildwheel.yml to setup qemu on linux runner

* Update cibuildwheel.yml to use latest artifact actions

* pyproject.toml (tool.cibuildwheel): Use 'uname -m' to determine arch

* .github/workflows/cibuildwheel.yml: Update macOS runners

* .github/workflows/cibuildwheel.yml: No qemu for x86_64, i686

* .github/workflows/cibuildwheel.yml: Cancel previous workflow runs

* pyproject.toml (tool.cibuildwheel): Skip failing pp39-manylinux_x86_64 build

* .github/workflows/cibuildwheel.yml: Upgrade cibuildwheel to 2.19.1

* pyproject.toml (tool.cibuildwheel): Skip failing pp39-manylinux_aarch64 build

---------

Co-authored-by: Ted Ralphs <ted@lehigh.edu>
Co-authored-by: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
  • Loading branch information
3 people authored Jun 25, 2024
1 parent 5f9c760 commit 29b7aa2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
types:
- published

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
Expand All @@ -23,18 +28,26 @@ jobs:
arch: x86_64
- os: ubuntu-latest
arch: i686
- os: ubuntu-latest
arch: aarch64
- os: macos-13
arch: x86_64
- os: macos-latest
arch: auto
- os: macos-14
arch: arm64
env:
CIBW_ARCHS: ${{ matrix.arch }}

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux' && matrix.arch != 'x86_64' && matrix.arch != 'i686'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.19.1

- uses: actions/upload-artifact@v3
with:
Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ build-backend = "setuptools.build_meta"
# Use --no-third-party to avoid linking in GLPK.
# The resulting binary would not be distributable.
before-all = """
set -x
apt-get install --yes wget || yum install -y wget || brew install bash coreutils
wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
sed -i.bak '/invoke_make/s/install/-j1 install/' coinbrew
chmod +x coinbrew
case "$CIBW_ARCHS" in
arm64) config_args='--build=arm-apple-darwin';;
case "$(uname -m)" in
arm64) config_args="--build=arm-apple-darwin";;
aarch64) config_args="--build=aarch64-unknown-linux-gnu";;
esac
eval ./coinbrew build Cbc@2.10.11 --no-third-party --parallel-jobs 16 --prefix=$(pwd)/local --verbosity 4 $config_args || echo ignoring errors
./coinbrew fetch Cbc@2.10.11 --no-third-party && eval ./coinbrew build Cbc --no-third-party --parallel-jobs 16 --prefix=$(pwd)/local --verbosity 4 $config_args || (cat build/Data/Sample/1.2.12/config.log; echo ignoring errors)
"""
environment = { PATH="$(pwd)/local/bin:$PATH", LD_LIBRARY_PATH="$(pwd)/local/lib:$LD_LIBRARY_PATH", PKG_CONFIG_PATH="$(pwd)/local/lib/pkgconfig:$PKG_CONFIG_PATH" }
skip = ["pp*-macosx*", "*-musllinux*", "pp31*-*", "pp*-*i686", "cp312-*i686"]
environment = { PATH="$(pwd)/local/bin:$PATH", LD_LIBRARY_PATH="$(pwd)/local/lib:$LD_LIBRARY_PATH", PKG_CONFIG_PATH="$(pwd)/local/lib/pkgconfig:$PKG_CONFIG_PATH", CIBW_ARCHS="$CIBW_ARCHS" }
skip = ["pp*-macosx*", "*-musllinux*", "pp31*-*", "pp*-*i686", "pp39-manylinux*", "cp312-*i686"]

0 comments on commit 29b7aa2

Please sign in to comment.