From 5fe8c876b39c8c417d53b9721f2b540dff638e9f Mon Sep 17 00:00:00 2001 From: odidev Date: Tue, 31 Aug 2021 13:38:15 +0530 Subject: [PATCH] Add Linux AArch64 wheel build support --- .circleci/config.yml | 48 ++++++++++++++++++++++++++++++++++++ ci/travis/build-manylinux.sh | 4 +++ 2 files changed, 52 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index bad5157a..5af47bb3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,6 +111,47 @@ jobs: command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* + manylinux2014-aarch64: + machine: + image: ubuntu-2004:202101-01 + resource_class: arm.medium + steps: + - checkout + - python/load-cache: + key: manylinuxdepsv6-{{ .Branch }}.{{ arch }} + dependency-file: requirements_dev.txt + - run: + name: Git LFS + command: | + curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash + sudo apt-get install git-lfs + git lfs install + git lfs pull + - run: + name: Deps + command: | + sudo apt-get install python3-pip + pip3 install -U pip + pip3 install twine + which twine + - python/save-cache: + key: manylinuxdepsv6-{{ .Branch }}.{{ arch }} + dependency-file: requirements_dev.txt + - run: + name: Build Wheels + command: | + if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then + docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ; + fi + ./ci/travis/build-manylinux.sh + - run: + name: sdist + command: python3 setup.py sdist + - run: + name: Upload Wheels + command: | + twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* + workflows: version: 2.1 main: @@ -132,6 +173,13 @@ workflows: only: /.*/ branches: ignore: /.*/ + - manylinux2014-aarch64: + context: Docker + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ - osx: matrix: parameters: diff --git a/ci/travis/build-manylinux.sh b/ci/travis/build-manylinux.sh index 9ec17450..ede5ff24 100755 --- a/ci/travis/build-manylinux.sh +++ b/ci/travis/build-manylinux.sh @@ -5,6 +5,10 @@ docker_tag="parallelssh/ssh2-manylinux" rm -rf build ssh2/libssh2.* python ci/appveyor/fix_version.py . +if [[ `uname -m` == "aarch64" ]]; then + sed -i 's/2010_x86_64/2014_aarch64/g' ci/docker/manylinux/Dockerfile +fi + docker pull $docker_tag || echo docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker push $docker_tag; fi