Skip to content

Commit 682b3eb

Browse files
committed
ci: migrate macos arm wheels to mac-14, abandon openmp
1 parent d434760 commit 682b3eb

File tree

2 files changed

+9
-64
lines changed

2 files changed

+9
-64
lines changed

.github/workflows/wheels.yml

Lines changed: 9 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build
22

3-
on: [push, pull_request]
3+
on: [pull_request] # TODO: only on tags
44

55
jobs:
66
build_wheels:
@@ -10,30 +10,26 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
include:
13-
- os: ubuntu-latest
14-
label: "linux-target-x86_64"
15-
- os: macos-13
16-
label: "macos-target-x86_64"
13+
- label: "linux-target-x86_64"
14+
os: ubuntu-latest
15+
- label: "macos-target-x86_64"
16+
os: macos-13
1717
env:
1818
MACOSX_DEPLOYMENT_TARGET: "10.15"
1919
CIBW_ARCHS_MACOS: "x86_64"
20-
- os: macos-13
20+
- os: macos-14
2121
label: "macos-target-arm64"
2222
env:
2323
MACOSX_DEPLOYMENT_TARGET: "11.0"
2424
CIBW_ARCHS_MACOS: "arm64"
25-
CC: "Clang"
26-
CXX: "Clang++"
25+
CMAKE_ARGS: "-DNIFTY_LS_OPENMP=OFF"
2726

2827
env:
2928
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.env.MACOSX_DEPLOYMENT_TARGET }}
3029
CIBW_ARCHS_MACOS: ${{ matrix.env.CIBW_ARCHS_MACOS }}
31-
CC: ${{ matrix.env.CC }}
32-
CXX: ${{ matrix.env.CXX }}
3330
CIBW_CONFIG_SETTINGS: "cmake.verbose=true"
3431
CIBW_BUILD_VERBOSITY: 1
35-
OMP_DISPLAY_ENV: "true"
36-
32+
CMAKE_ARGS: ${{ matrix.env.CMAKE_ARGS }}
3733

3834
steps:
3935
- uses: actions/checkout@v4
@@ -48,19 +44,6 @@ jobs:
4844
echo "LDFLAGS=$LDFLAGS -L$prefix/lib" >> $GITHUB_ENV
4945
echo "CXXFLAGS=$CXXFLAGS -I$prefix/include" >> $GITHUB_ENV
5046
51-
- name: Set OpenMP env for macos arm64
52-
if: matrix.label == 'macos-target-arm64'
53-
run: |
54-
# pkg=$(brew fetch --force --bottle-tag=arm64_ventura [email protected] | grep 'Downloaded to' | cut -d' ' -f3)
55-
# brew install $pkg
56-
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/4da6acd9348624f2957d841a2d8a75018021778e/Formula/lib/libomp.rb
57-
brew install -s ./libomp.rb
58-
prefix=$(brew --prefix libomp)
59-
echo "LDFLAGS=$LDFLAGS -L$prefix/lib -lomp" >> $GITHUB_ENV
60-
# echo "CXXFLAGS=$CXXFLAGS -I$prefix/include -target arm64-apple-macos11 -Xpreprocessor -fopenmp" >> $GITHUB_ENV
61-
echo "CXXFLAGS=$CXXFLAGS -I$prefix/include -target arm64-apple-macos11" >> $GITHUB_ENV
62-
echo "CMAKE_ARGS=$CMAKE_ARGS -DOpenMP_CXX_INCLUDE_DIR=$prefix/include" >> $GITHUB_ENV
63-
6447
- name: Build wheels
6548
uses: pypa/[email protected]
6649

@@ -93,45 +76,8 @@ jobs:
9376
name: cibw-sdist
9477
path: dist/*.tar.gz
9578

96-
test_arm64_wheels:
97-
needs: [build_wheels]
98-
runs-on: macos-14
99-
env:
100-
OMP_DISPLAY_ENV: "true"
101-
strategy:
102-
fail-fast: false
103-
matrix:
104-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
105-
106-
steps:
107-
- uses: actions/checkout@v4
108-
with:
109-
fetch-depth: 0
110-
111-
- name: Set up Python ${{ matrix.python-version }}
112-
uses: actions/setup-python@v5
113-
with:
114-
python-version: ${{ matrix.python-version }}
115-
116-
117-
- uses: actions/download-artifact@v4
118-
with:
119-
name: cibw-wheels-macos-target-arm64
120-
path: wheelhouse/
121-
122-
- name: Install arm64 wheels
123-
run: |
124-
pip install -U pip
125-
pip install -f wheelhouse/ nifty-ls[test]
126-
# ensure that the previous install didn't resolve to PyPI
127-
pip install --no-index -f wheelhouse/ nifty-ls[test]
128-
129-
- name: Run tests
130-
run: |
131-
pytest -s --benchmark-skip tests/
132-
13379
upload_all:
134-
needs: [build_wheels, make_sdist, test_arm64_wheels]
80+
needs: [build_wheels, make_sdist]
13581
environment: pypi
13682

13783
permissions:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ docstring-code-format = true
5454
archs = "auto64"
5555
test-command = "pytest -s --benchmark-skip {project}/tests"
5656
test-extras = "test"
57-
test-skip = "*-macosx_arm64" # cross-compilation
5857
skip = "pp* *-musllinux_*"
5958

6059
[tool.cibuildwheel.linux]

0 commit comments

Comments
 (0)