Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ jobs:
platform_id: macosx_x86_64
deployment_target: 13.0


# MacOS ARM
- os: macos-14
python: 310
Expand Down Expand Up @@ -138,12 +137,14 @@ jobs:
- name: Checkout CPT
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: macOS OpenMP setup
if: runner.os == 'macOS'
run: bash CI/github/setup_macos_runner.sh

- name: Build and test wheels
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.2
with:
output-dir: wheelhouse
env:
CIBW_BEFORE_BUILD: "python -m pip install --upgrade pip"
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
Expand All @@ -157,8 +158,6 @@ jobs:
CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }}
CIBW_ENABLE: cpython-freethreading

run: bash CI/github/build_wheels.sh

- name: Store artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 1 addition & 5 deletions CI/github/build_wheels.sh → CI/github/setup_macos_runner.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -x

# OpenMP is not present on macOS by default
if [[ "$RUNNER_OS" == "macOS" ]]; then
if [[ "$RUNNER_OS" == "macOS" ]]; then # this if is useless, but better be safe
echo "Installing Mac OS dependencies"
brew_prefix=$(brew --prefix)
brew install libomp
Expand All @@ -15,7 +15,3 @@ if [[ "$RUNNER_OS" == "macOS" ]]; then
export CXXFLAGS="$CXXFLAGS -I$brew_prefix/opt/libomp/include"
export LDFLAGS="$LDFLAGS -Wl,-rpath,$brew_prefix/opt/libomp/lib -L$brew_prefix/opt/libomp/lib -lomp"
fi

python -m pip install cibuildwheel==3.1.1
python -m cibuildwheel --print-build-identifiers
python -m cibuildwheel --output-dir wheelhouse
Loading