|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | 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] |
16 | 15 |
|
17 | | - steps: |
18 | | - - uses: actions/checkout@v4 |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Build wheels |
| 20 | + |
| 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" |
19 | 37 |
|
20 | | - - name: Build wheels |
21 | | - |
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 |
39 | 42 |
|
40 | 43 | build_sdist: |
41 | 44 | name: Build source distribution |
|
0 commit comments