diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8dd2596..b6adf0ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,9 @@ jobs: Linux: runs-on: ubuntu-latest + strategy: + matrix: + image: [manylinux2014_x86_64, manylinux2014_i686, manylinux2014_aarch64] steps: - uses: actions/checkout@v2 @@ -16,9 +19,14 @@ jobs: id: tag run: | echo ::set-output name=tag::${GITHUB_REF#refs/tags/} + - name: Set up QEMU + if: ${{ matrix.image == 'manylinux2014_aarch64' }} + id: qemu + uses: docker/setup-qemu-action@v1 - name: Building release run: | - make linux_release + docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ + quay.io/pypa/${{ matrix.image }} ./build-wheels.sh - name: Upload distributions artifacts uses: actions/upload-artifact@v1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f14fe11e..c1d10bf8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,3 +93,38 @@ jobs: shell: bash run: | poetry run pytest -q tests + + Linux-AArch64: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310] + fail-fast: false + env: + py: /opt/python/${{ matrix.python-version }}/bin/python + img: quay.io/pypa/manylinux2014_aarch64 + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + + - name: Setup test environment and run tests + run: | + docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ + ${{ env.img }} \ + bash -exc '\ + echo -e "\e[1;34m Install poetry \e[0m" && \ + curl -fsS -o install-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py && \ + ${{ env.py }} install-poetry.py --preview -y && \ + echo -e "\e[1;34m Update PATH \e[0m" && \ + export PATH="/root/.local/bin:$PATH" && \ + echo -e "\e[1;34m Configure poetry \e[0m" && \ + poetry config virtualenvs.in-project true && \ + echo -e "\e[1;34m Install dependencies \e[0m" && \ + poetry install --only default --only test -vvv && \ + echo -e "\e[1;34m Test Pure Python \e[0m" && \ + PENDULUM_EXTENSIONS=0 poetry run pytest -q tests && \ + echo -e "\e[1;34m Test \e[0m" && \ + poetry run pytest -q tests' diff --git a/build-wheels.sh b/build-wheels.sh index 1c8f1cb5..ac6b6df9 100755 --- a/build-wheels.sh +++ b/build-wheels.sh @@ -3,11 +3,18 @@ set -e -x cd $(dirname $0) -export PATH=/opt/python/cp38-cp38/bin/:$PATH - -curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -/opt/python/cp38-cp38/bin/python get-poetry.py --preview -y -rm get-poetry.py +curl -fsS -o install-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py +if [ $(uname -m) == 'i686' ]; then + yum update + curl -fsS -o rust-1.59.0-i686-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/rust-1.59.0-i686-unknown-linux-gnu.tar.gz + tar -xf rust-1.59.0-i686-unknown-linux-gnu.tar.gz && cd rust-1.59.0-i686-unknown-linux-gnu + ./install.sh && cd ../ + curl -fsS -o openssl-1.1.1k.tar.gz https://ftp.openssl.org/source/openssl-1.1.1k.tar.gz + tar -xzf openssl-1.1.1k.tar.gz && cd openssl-1.1.1k + ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic + make && make install && cd ../ +fi +export OLD_PATH=$PATH for PYBIN in /opt/python/cp3*/bin; do if [ "$PYBIN" == "/opt/python/cp34-cp34m/bin" ]; then @@ -16,8 +23,14 @@ for PYBIN in /opt/python/cp3*/bin; do if [ "$PYBIN" == "/opt/python/cp35-cp35m/bin" ]; then continue fi + if [ "$PYBIN" == "/opt/python/cp36-cp36m/bin" ]; then + continue + fi rm -rf build - "${PYBIN}/python" $HOME/.poetry/bin/poetry build -vvv + export PATH=${PYBIN}:$OLD_PATH + POETRY_HOME=${PYBIN} ${PYBIN}/python install-poetry.py --preview -y + export PATH=${PYBIN}/bin:$PATH + poetry build -vvv done cd dist