Skip to content

Commit 06dac1a

Browse files
authored
RLS: update cibuildwheel (#30)
1 parent acecee6 commit 06dac1a

File tree

4 files changed

+38
-19
lines changed

4 files changed

+38
-19
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,33 @@ on:
1919

2020
jobs:
2121
build_wheels:
22-
name: Build wheels on ${{ matrix.os }}
22+
name: Build wheels on ${{ matrix.os }}-${{ matrix.arch }}
2323
runs-on: ${{ matrix.os }}
2424
strategy:
25+
fail-fast: false
2526
matrix:
26-
os: [ubuntu-22.04, windows-2022, macos-11]
27+
include:
28+
- os: ubuntu-22.04
29+
arch: x86_64
30+
- os: ubuntu-22.04
31+
arch: aarch64
32+
- os: windows-2022
33+
arch: AMD64
34+
- os: macos-11
35+
arch: x86_64
36+
macosx_deployment_target: "11.0"
37+
cmake_osx_architectures: x86_64
38+
- os: macos-14
39+
arch: arm64
40+
macosx_deployment_target: "14.0"
41+
cmake_osx_architectures: arm64
2742

2843
steps:
2944
- uses: actions/checkout@v4
3045

3146
- name: Set up QEMU
32-
if: runner.os == 'Linux'
33-
uses: docker/setup-qemu-action@v2
47+
if: runner.os == 'Linux' && matrix.arch == 'aarch64'
48+
uses: docker/setup-qemu-action@v3
3449
with:
3550
platforms: arm64
3651

@@ -55,11 +70,19 @@ jobs:
5570
bash scripts/build_lib.sh
5671
5772
- name: Build wheels
58-
uses: pypa/[email protected]
73+
uses: pypa/[email protected]
74+
env:
75+
CIBW_BUILD: "cp39-*" # pick one version
76+
CIBW_SKIP: "*-musllinux*"
77+
CIBW_ARCHS: ${{ matrix.arch }}
78+
CIBW_ENVIRONMENT_MACOS:
79+
FC=gfortran-13
80+
MACOSX_DEPLOYMENT_TARGET='${{ matrix.macosx_deployment_target }}'
81+
CMAKE_OSX_ARCHITECTURES='${{ matrix.cmake_osx_architectures }}'
5982

6083
- uses: actions/upload-artifact@v4
6184
with:
62-
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
85+
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}
6386
path: ./wheelhouse/*.whl
6487

6588
build_sdist:

pyproject.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,27 @@ version = {attr = "pypestutils.version.__version__"}
5757
include = ["pypestutils", "pypestutils.*"]
5858

5959
[tool.cibuildwheel]
60-
build = "cp38-*" # pick one; see also [project.requires-python]
61-
skip = "*-musllinux*"
62-
build-verbosity = "3"
60+
build-verbosity = "2"
6361
repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}"
6462
test-requires = "tox"
6563
test-command = "tox --conf {project} --installpkg {wheel}"
6664

6765
[tool.cibuildwheel.linux]
68-
archs = ["x86_64", "aarch64"]
6966
before-build = [
70-
"pip install meson ninja",
67+
"pip install meson ninja wheel",
7168
"bash {project}/scripts/build_lib.sh",
7269
]
7370
test-skip = "*aarch64" # slow!
7471

7572
[tool.cibuildwheel.macos]
76-
archs = ["x86_64"] # , "arm64"] - need either native host or fortran cross-compiler
77-
environment = { MACOSX_DEPLOYMENT_TARGET="10.9", FC="gfortran-13" }
73+
# see CIBW_ENVIRONMENT_MACOS in release.yml
7874
before-build = [
79-
"pip install meson ninja",
75+
"pip install meson ninja wheel",
8076
"bash {project}/scripts/build_lib.sh",
8177
]
82-
test-skip = "*-macosx_arm64"
8378

8479
[tool.cibuildwheel.windows]
85-
archs = ["AMD64"]
80+
before-build = "pip install wheel"
8681

8782
[tool.isort]
8883
profile = "black"

tests/test_notebooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import logging
33
import pytest
44
import os
5-
import pyemu
65

76

87
# @pytest.mark.parametrize(
@@ -29,6 +28,8 @@
2928
# return
3029

3130
def test_notebooks():
31+
import pyemu
32+
3233
nb_dir = os.path.join("examples")
3334
nb_files = [f for f in os.listdir(nb_dir) if f.endswith(".ipynb")]
3435
for nb_file in nb_files:

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
requires =
33
tox>=4
4-
env_list = py{39,310,311}
4+
env_list = py{38,39,310,311,312}
55

66
[testenv]
77
description = run unit tests
@@ -14,4 +14,4 @@ install_command =
1414
ignore_errors = True
1515
ignore_outcome = True
1616
commands =
17-
pytest {posargs:tests}
17+
pytest {posargs:tests} -k "not test_notebooks"

0 commit comments

Comments
 (0)