From b5d78f670d0e2132bbb1647261332702af2ed084 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 6 Apr 2024 09:44:32 +0200 Subject: [PATCH] CI: enable builds for MacOS Arm Fixes #227. --- .github/workflows/build_wheels.yml | 17 +++++++++-------- .github/workflows/ci.yml | 28 +++++++++++++++++++--------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 62004409..87b79023 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -11,24 +11,24 @@ 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 @@ -36,10 +36,10 @@ jobs: - 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 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d533a24..2e6fe221 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ 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 @@ -139,28 +139,38 @@ jobs: 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 }} @@ -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 @@ -214,7 +224,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | C:/vcpkg_binary_cache