-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLD/RLS: add aarch64 linux wheels (#243)
- Loading branch information
1 parent
5759f65
commit c4deb39
Showing
5 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
linux-aarch64-wheels: | ||
working_directory: ~/linux-aarch64-wheels | ||
machine: | ||
image: ubuntu-2004:2022.04.1 | ||
docker_layer_caching: true | ||
# resource_class is what tells CircleCI to use an ARM worker for native arm builds | ||
# https://circleci.com/product/features/resource-classes/ | ||
resource_class: arm.medium | ||
environment: | ||
CIBUILDWHEEL: 1 | ||
CIBW_BUILD: "cp*-manylinux_aarch64" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build docker image with GDAL install | ||
command: docker build -f ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile -t manylinux-aarch64-vcpkg-gdal:latest . | ||
- run: | ||
name: Build the Linux aarch64 wheels. | ||
command: | | ||
python3 -m pip install --user cibuildwheel==2.12.1 | ||
python3 -m cibuildwheel --output-dir wheelhouse | ||
- run: | ||
name: Test the wheels | ||
command: | | ||
python3 -m pip install -r ci/requirements-wheel-test.txt | ||
python3 -m pip install --no-deps geopandas | ||
python3 -m pip install --pre --find-links wheelhouse pyogrio | ||
python3 -m pip list | ||
cd .. | ||
python3 -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" | ||
python3 -m pytest --pyargs pyogrio.tests -v | ||
- store_artifacts: | ||
path: wheelhouse/ | ||
|
||
workflows: | ||
wheel-build: | ||
jobs: | ||
- linux-aarch64-wheels: | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
- wheels-linux-aarch64 | ||
tags: | ||
only: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE arm64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Linux) | ||
set(VCPKG_BUILD_TYPE release) | ||
|
||
set(VCPKG_LIBRARY_LINKAGE static) | ||
if(PORT MATCHES "gdal") | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM quay.io/pypa/manylinux_2_28_aarch64:2023-04-16-157f52a | ||
|
||
# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) | ||
RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd | ||
|
||
# require python >= 3.7 (python 3.6 is default on base image) for meson | ||
RUN ln -s /opt/python/cp38-cp38/bin/python3 /usr/bin/python3 | ||
|
||
RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \ | ||
git -C /opt/vcpkg checkout 580f143d123ce6abb5c135b11d6402c9a54bc9b9 | ||
|
||
ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg" | ||
ENV PATH="${PATH}:/opt/vcpkg" | ||
|
||
ENV VCPKG_DEFAULT_TRIPLET="arm64-linux-dynamic-release" | ||
# pkgconf fails to build with default debug mode of arm64-linux host | ||
ENV VCPKG_DEFAULT_HOST_TRIPLET="arm64-linux-release" | ||
|
||
# Must be set when building on arm | ||
ENV VCPKG_FORCE_SYSTEM_BINARIES=1 | ||
|
||
# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786 | ||
RUN bootstrap-vcpkg.sh && \ | ||
mkdir -p /root/.vcpkg/ $HOME/.vcpkg && \ | ||
touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt && \ | ||
vcpkg integrate install && \ | ||
vcpkg integrate bash | ||
|
||
COPY ci/custom-triplets/arm64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/arm64-linux-dynamic-release.cmake | ||
COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/ | ||
COPY ci/vcpkg.json opt/vcpkg/ | ||
|
||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/arm64-linux-dynamic-release/lib" | ||
RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \ | ||
--overlay-ports=opt/vcpkg/custom-ports \ | ||
--feature-flags="versions,manifests" \ | ||
--x-manifest-root=opt/vcpkg \ | ||
--x-install-root=opt/vcpkg/installed && \ | ||
vcpkg list | ||
|
||
# setting git safe directory is required for properly building wheels when | ||
# git >= 2.35.3 | ||
RUN git config --global --add safe.directory "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters