Skip to content

Commit

Permalink
CI: enable builds for MacOS Arm
Browse files Browse the repository at this point in the history
Fixes #227.
  • Loading branch information
lonvia committed Apr 21, 2024
1 parent e3038c3 commit b5d78f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-20.04, windows-2019, macos-11, macos-14]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: pybind/pybind11
ref: v2.11.1
path: contrib/pybind11

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: mapbox/protozero
ref: v1.7.1
path: contrib/protozero

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: osmcode/libosmium
ref: v2.20.0
path: contrib/libosmium


- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_ARCHS: native
CIBW_SKIP: "pp* *musllinux*"
CIBW_SKIP: "pp* *musllinux* cp38-macosx_arm64"
CIBW_TEST_REQUIRES: pytest pytest-httpserver shapely
CIBW_TEST_REQUIRES_LINUX: urllib3<2.0 pytest pytest-httpserver shapely
CIBW_TEST_COMMAND: pytest {project}/test
Expand All @@ -49,6 +49,7 @@ jobs:
CIBW_BEFORE_BUILD_WINDOWS: vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows boost-variant:x64-windows boost-iterator:x64-windows lz4:x86-windows
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"'

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pyosmium-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,36 +131,46 @@ jobs:

strategy:
matrix:
compiler: [gcc-old, clang-old, gcc, clang, macos]
compiler: [gcc-old, clang-old, gcc, clang, macos-intel, macos-arm]
include:
- compiler: gcc-old
cc: gcc-10
cxx: g++-10
platform: ubuntu-20.04
python: 3.6
deps: release
flavour: linux
- compiler: clang-old
cc: clang-10
cxx: clang++-10
platform: ubuntu-20.04
python: 3.6
deps: release
flavour: linux
- compiler: gcc
cc: gcc-12
cxx: g++-12
platform: ubuntu-22.04
python: "3.11"
python: "3.12"
deps: develop
flavour: linux
- compiler: clang
cc: clang-14
cxx: clang++-14
platform: ubuntu-22.04
python: "3.11"
python: "3.12"
deps: develop
- compiler: macos
platform: macos-latest
python: "3.11"
flavour: linux
- compiler: macos-intel
platform: macos-13
python: "3.10"
deps: develop
flavour: macos
- compiler: macos-arm
platform: macos-14
python: "3.12"
deps: develop
flavour: macos

env:
CC: ${{ matrix.cc }}
Expand All @@ -179,12 +189,12 @@ jobs:

- name: Install packages
run: sudo apt-get install -y -qq libboost-dev libexpat1-dev zlib1g-dev libbz2-dev libproj-dev libgeos-dev liblz4-dev
if: ${{ matrix.compiler != 'macos' }}
if: ${{ matrix.flavour == 'linux' }}

- name: Install packages
run: brew install boost geos lz4
shell: bash
if: ${{ matrix.compiler == 'macos' }}
if: ${{ matrix.flavour == 'macos' }}

- name: Install clang package
run: sudo apt-get install -y -qq clang-6.0
Expand Down Expand Up @@ -214,7 +224,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
C:/vcpkg_binary_cache
Expand Down

0 comments on commit b5d78f6

Please sign in to comment.