Skip to content

Commit

Permalink
Update to mac wheels build.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Jan 30, 2025
1 parent 8102821 commit c1a395c
Showing 1 changed file with 23 additions and 28 deletions.
51 changes: 23 additions & 28 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build wheels

on: [push, pull_request]

# Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17.
on: [push, pull_request]

jobs:
build_wheels_windows:
Expand All @@ -11,21 +9,17 @@ jobs:
env:
TEMP: C:\Temp
TMP: C:\Temp

strategy:
matrix:
os: [windows-2022]
arch: [x86, x64]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
steps:
- name: Support longpaths
run: git config --system core.longpaths true

- name: Check LongPathsEnabled
run: |
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled

- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -45,19 +39,16 @@ jobs:
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.python-version }}-${{ matrix.arch }}
name: wheels-windows-${{ matrix.python-version }}-${{ matrix.arch }}-${{ github.run_id }}
path: ./dist/*.whl

build_wheels_mac:
name: ${{ matrix.os }} ${{ matrix.python-version }} wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Trying to use cibuildwheels to build mac wheels fails because the version of XCode is not high enough.
# There is documentation here https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md on how to
# set it but I could not get it to work while using the standard images provided by github actions does work.
os: [macos-latest, macos-13]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
SYSTEM_VERSION_COMPAT: 0

Expand All @@ -80,16 +71,16 @@ jobs:
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.python-version }}
name: wheels-macos-${{ matrix.python-version }}-${{ github.run_id }}
path: ./dist/*.whl

build_wheels_manylinux_x86_64:
name: Build manylinux wheels
name: Build manylinux wheels (x86_64)
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
Expand All @@ -100,17 +91,18 @@ jobs:
CIBW_PLATFORM: "linux"
CIBW_SKIP: "cp36-* cp37-* cp38-*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64"
run: |
cibuildwheel --output-dir wheelhouse
cibuildwheel --output-dir wheelhouse --verbose
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86_64
name: wheels-linux-x86_64-${{ github.run_id }}
path: wheelhouse/*.whl

build_wheels_manylinux_arm64:
name: Build manylinux wheels ${{ matrix.python-version }} (arm64)
name: Build manylinux wheels (ARM64)
runs-on: ubuntu-24.04
strategy:
matrix:
Expand All @@ -135,11 +127,14 @@ jobs:
CIBW_PLATFORM: "linux"
CIBW_BUILD: ${{ matrix.python-version }}
CIBW_ARCHS_LINUX: "aarch64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64"
CIBW_ENVIRONMENT: "CXXFLAGS='-g -O2 -fno-omit-frame-pointer'"
CIBW_BEFORE_BUILD: "echo 'Running Debug Mode' && pip install debugpy"
run: |
cibuildwheel --output-dir wheelhouse
cibuildwheel --output-dir wheelhouse --verbose
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-arm64-${{ matrix.python-version }}
name: wheels-linux-arm64-${{ matrix.python-version }}-${{ github.run_id }}
path: wheelhouse/*.whl

0 comments on commit c1a395c

Please sign in to comment.