diff --git a/.circleci/config.yml b/.circleci/config.yml index bad5157a..d621cf3f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,6 +111,44 @@ 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: Upload Wheels + command: | + twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* + workflows: version: 2.1 main: @@ -132,6 +170,13 @@ workflows: only: /.*/ branches: ignore: /.*/ + - manylinux2014-aarch64: + context: Docker + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ - osx: matrix: parameters: diff --git a/ci/docker/manylinux/Dockerfile.aarch64 b/ci/docker/manylinux/Dockerfile.aarch64 new file mode 100644 index 00000000..9111ae8a --- /dev/null +++ b/ci/docker/manylinux/Dockerfile.aarch64 @@ -0,0 +1,27 @@ +FROM quay.io/pypa/manylinux2014_aarch64 + +ENV OPENSSL openssl-1.1.1g +ENV SYSTEM_LIBSSH2 1 +ENV LIBSSH2_VERSION 1.9.0 + +RUN yum install zlib-devel -y + +ADD libssh2-${LIBSSH2_VERSION}.tar.gz libssh2-${LIBSSH2_VERSION}.tar.gz +ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz + +RUN tar -xzf ${OPENSSL}.tar.gz +# Openssl +RUN cd ${OPENSSL} && \ + ./config --prefix=/usr --openssldir=/usr/openssl threads shared && \ + make -j4 && make install + +# Libssh2 +RUN mkdir -p build_libssh2 && cd build_libssh2 && \ + cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-libssh2-${LIBSSH2_VERSION} \ + -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \ + -DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \ + cmake --build . --config Release --target install + +RUN rm -rf ${OPENSSL}* build_libssh2 libssh2.tar.gz + +VOLUME /var/cache diff --git a/ci/travis/build-manylinux.sh b/ci/travis/build-manylinux.sh index 9ec17450..2ecea948 100755 --- a/ci/travis/build-manylinux.sh +++ b/ci/travis/build-manylinux.sh @@ -1,12 +1,18 @@ #!/bin/bash -xe docker_tag="parallelssh/ssh2-manylinux" +docker_file="ci/docker/manylinux/Dockerfile" rm -rf build ssh2/libssh2.* python ci/appveyor/fix_version.py . +if [[ `uname -m` == "aarch64" ]]; then + docker_tag=${docker_tag}-aarch64 + docker_file=${docker_file}.aarch64 +fi + docker pull $docker_tag || echo -docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag +docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file} if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker push $docker_tag; fi docker run -e TRAVIS_TAG="$TRAVIS_TAG" --rm -v `pwd`:/io $docker_tag /io/ci/travis/build-wheels.sh ls wheelhouse/