Skip to content

Commit

Permalink
.github/workflows/cibuildwheel.yml: Update (#180)
Browse files Browse the repository at this point in the history
* setup.py: Set python_requires="<3.12"
* pyproject.toml: Avoid oldest-supported-numpy on PyPy
* pyproject.toml (tool.cibuildwheel): Skip PyPy >= 3.10
* pyproject.toml (tool.cibuildwheel): Skip PyPy i686
* .github/workflows/cibuildwheel.yml: Use a separate matrix job for i686
  • Loading branch information
mkoeppe committed Oct 20, 2023
1 parent 3bf3b01 commit 2178e19
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,26 @@ on:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-12]
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-latest
arch: i686
- os: macos-latest
arch: auto
env:
CIBW_ARCHS: ${{ matrix.arch }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.2
uses: pypa/cibuildwheel@v2.16.2

- uses: actions/upload-artifact@v3
with:
Expand All @@ -34,7 +42,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ requires = [
'wheel',
'Cython < 3',
# https://numpy.org/devdocs/user/depending_on_numpy.html#build-time-dependency
'oldest-supported-numpy'
# from https://github.com/scipy/oldest-supported-numpy/pull/78#issuecomment-1747936818:
"oldest-supported-numpy; platform_python_implementation != 'PyPy'",
"numpy; platform_python_implementation=='PyPy'"
]
build-backend = "setuptools.build_meta"

Expand All @@ -19,4 +21,4 @@ before-all = """
./coinbrew build Cbc@2.10.10 --no-third-party --parallel-jobs 16 --prefix=$(pwd)/local --verbosity 4 || 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*"]
skip = ["pp*-macosx*", "*-musllinux*", "pp31*-*", "pp*-*i686"]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,5 +425,6 @@ def getBdistFriendlyString(s):
cmdclass={'build_ext': build_ext},
ext_modules=ext_modules,
install_requires=['numpy >= 1.5.0', 'scipy >= 0.10.0'],
python_requires="<3.12",
zip_safe = False,
package_data={"cylp": extra_files})

0 comments on commit 2178e19

Please sign in to comment.