Skip to content

Commit d806f74

Browse files
committed
release fix 3
1 parent b7ced97 commit d806f74

1 file changed

Lines changed: 30 additions & 27 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,38 @@ on:
77

88
jobs:
99
build_wheels:
10-
name: Build wheels on ${{ matrix.os }}
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
# Build on all 3 OSs
15-
os: [ubuntu-latest, windows-latest, macos-latest]
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
1615

17-
steps:
18-
- uses: actions/checkout@v4
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Build wheels
20+
uses: pypa/[email protected]
21+
env:
22+
# SKIP: Old Python, PyPy, Musl (Alpine), and 32-bit Linux
23+
CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *musllinux* *i686*"
24+
25+
# LINUX: Force C++17 (compatible with manylinux2014)
26+
CIBW_ENVIRONMENT_LINUX: "CXXFLAGS='-std=c++17'"
27+
28+
# MACOS: Install OpenMP and configure paths
29+
CIBW_BEFORE_ALL_MACOS: "brew install libomp"
30+
CIBW_ENVIRONMENT_MACOS: >
31+
CFLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include"
32+
CXXFLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include"
33+
LDFLAGS="-L$(brew --prefix libomp)/lib -lomp"
34+
OpenMP_ROOT="$(brew --prefix libomp)"
35+
# MACOS: Prevent cross-compilation errors (build arm64 on arm64 runner)
36+
CIBW_ARCHS_MACOS: "auto"
1937

20-
- name: Build wheels
21-
uses: pypa/[email protected]
22-
env:
23-
# Skip old Python versions
24-
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
25-
26-
# Linux: Force C++20
27-
CIBW_ENVIRONMENT_LINUX: "CXXFLAGS='-std=c++20'"
28-
29-
# macOS: Install OpenMP (libomp) before building
30-
CIBW_BEFORE_ALL_MACOS: "brew install libomp"
31-
32-
# macOS: Tell CMake where to find OpenMP
33-
# (Homebrew puts it in a weird spot, we need to point to it)
34-
CIBW_ENVIRONMENT_MACOS: >
35-
CFLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include"
36-
CXXFLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include"
37-
LDFLAGS="-L$(brew --prefix libomp)/lib -lomp"
38-
OpenMP_ROOT="$(brew --prefix libomp)"
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
41+
path: ./wheelhouse/*.whl
3942

4043
build_sdist:
4144
name: Build source distribution

0 commit comments

Comments
 (0)