Skip to content

Commit

Permalink
Add linux aarch64 wheel support
Browse files Browse the repository at this point in the history
  • Loading branch information
odidev committed May 18, 2021
1 parent fadfdde commit 8efd1fc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ jobs:
linux:
name: Linux
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout pygit2
uses: actions/checkout@v2

- run: |
/bin/sh travis/build-all-manylinux-wheels.sh
- name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v1

- name: x86_64 wheels
if: ${{ matrix.arch == 'x86_64' }}
run: /bin/sh travis/build-all-manylinux-wheels.sh :x86_64

- name: aarch64 wheels
if: ${{ matrix.arch == 'aarch64' }}
run: /bin/sh travis/build-all-manylinux-wheels.sh _aarch64

- name: Save wheels
uses: actions/upload-artifact@v2
Expand Down
4 changes: 3 additions & 1 deletion travis/build-all-manylinux-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
set -x
set -e

arch="${1}"

# Wait for docker pull to complete downloading container
manylinux_image="ghcr.io/pyca/cryptography-manylinux2014:x86_64"
manylinux_image="ghcr.io/pyca/cryptography-manylinux2014${arch}"
docker pull "${manylinux_image}" &
wait

Expand Down
7 changes: 6 additions & 1 deletion travis/build-manylinux-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ export CFLAGS="-fPIC"
export PKG_CONFIG_PATH="${OPENSSL_PATH}/lib/pkgconfig:${PYCA_OPENSSL_PATH}/lib/pkgconfig"

# Install requirements
yum -y install git libffi-devel cmake3
yum -y install git libffi-devel
yum -y install openssl wget
if [ ${ARCH} == 'aarch64' ]; then
yum -y install cmake
else
yum -y install cmake3
fi

# Copy source directory so we don't mangle with it
SRC_DIR=/io/src
Expand Down

0 comments on commit 8efd1fc

Please sign in to comment.