Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ on: push

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-18.04, windows-latest, macos-latest] # skip windows
os: [ubuntu-20.04, macos-11]
arch: [auto, aarch64]
exclude:
- os: macos-11
arch: aarch64

steps:
- uses: actions/checkout@v2
Expand All @@ -23,15 +27,23 @@ jobs:
with:
python-version: '3.7'

#cibuildwheel support aarch64, via emulation.
#Please refer - https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
- uses: docker/setup-qemu-action@v1
if: ${{ matrix.arch == 'aarch64' }}
name: Set up QEMU

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.1.1

- name: Build wheels
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_SKIP: "pp* *-manylinux_i686"
CIBW_BEFORE_BUILD_LINUX: "/bin/bash cibuild/linux_steps.sh"
CIBW_BEFORE_BUILD_MACOS: "/bin/bash cibuild/macos_steps.sh"
CIBW_BEFORE_TEST_LINUX: "/bin/bash cibuild/aarch64_extra_steps.sh"
CIBW_TEST_COMMAND: "cd {project}/pyosmium && rm -rf build && pytest test"
CIBW_TEST_REQUIRES: pytest shapely
CIBW_TEST_SKIP: "cp310-macosx*" # missing libgeos
Expand Down
9 changes: 9 additions & 0 deletions cibuild/aarch64_extra_steps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

if [ "$(uname -m)" == "aarch64" ]
then
yum install -y wget
wget https://download-ib01.fedoraproject.org/pub/epel/7/aarch64/Packages/g/geos-3.4.2-2.el7.aarch64.rpm
rpm -i geos-3.4.2-2.el7.aarch64.rpm
rm geos-3.4.2-2.el7.aarch64.rpm
fi
7 changes: 4 additions & 3 deletions cibuild/linux_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ echo "Running Linux steps"

CMAKE_BIN_URL_64=https://cmake.org/files/v3.6/cmake-3.6.3-Linux-x86_64.sh
CMAKE_BIN_URL_32=https://cmake.org/files/v3.6/cmake-3.6.3-Linux-i386.sh
CMAKE_BIN_URL_aarch64=https://cmake.org/files/v3.21/cmake-3.21.0-linux-aarch64.sh

function build_boost {
mkdir -p boost
Expand All @@ -27,6 +28,8 @@ function build_boost {
function build_cmake {
if [ "x${AUDITWHEEL_ARCH}" == "xi686" ] ; then
curl -o /tmp/cmake.sh "${CMAKE_BIN_URL_32}"
elif [ "x${AUDITWHEEL_ARCH}" == "xaarch64" ] ; then
curl -o /tmp/cmake.sh "${CMAKE_BIN_URL_aarch64}"
else
curl -o /tmp/cmake.sh "${CMAKE_BIN_URL_64}"
fi
Expand All @@ -51,9 +54,7 @@ ln -sf $(pwd)/pybind11 pyosmium/contrib/pybind11
ln -sf $(pwd)/libosmium pyosmium/contrib/libosmium
ln -sf $(pwd)/protozero pyosmium/contrib/protozero


yum install -y sparsehash-devel expat-devel boost-devel zlib-devel

yum install -y expat-devel boost-devel zlib-devel

# install bzip2
build_new_zlib
Expand Down