diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index 37f3959c1..bb10bbd91 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -20,3 +20,4 @@ variables: stages: - template: stage-lint.yml - template: stage-test.yml +- template: stage-test-aarch64.yml diff --git a/.azure-pipelines/deploy.yml b/.azure-pipelines/deploy.yml index f7d233198..529f41b15 100644 --- a/.azure-pipelines/deploy.yml +++ b/.azure-pipelines/deploy.yml @@ -88,6 +88,51 @@ stages: parameters: folder: wheelhouse + - job: manylinux_aarch64 + displayName: 'Manylinux_aarch64' + strategy: + matrix: + Py35 Arm64: + python.code: 'cp35-cp35m' + manylinux: 'manylinux_aarch64' + Py36 Arm64: + python.code: 'cp36-cp36m' + manylinux: 'manylinux_aarch64' + Py37 Arm64: + python.code: 'cp37-cp37m' + manylinux: 'manylinux_aarch64' + Py38 Arm64: + python.code: 'cp38-cp38' + manylinux: 'manylinux_aarch64' + pool: + vmImage: 'ubuntu-latest' + + steps: + - checkout: self + submodules: true + clean: true + + - script: docker run --rm --privileged hypriot/qemu-register + displayName: 'Registering qemu' + - script: | + set -xeo pipefail + docker run -v $(pwd):"${DOCKER_MULTIDICT_ROOT}":rw,z \ + -e HOST_USER_ID \ + "quay.io/pypa/manylinux2014_aarch64" \ + bash -c "cd $DOCKER_MULTIDICT_ROOT; + /opt/python/$(python.code)/bin/python -m venv .build-venv && \ + source .build-venv/bin/activate && \ + pip install -U setuptools wheel && \ + python setup.py bdist_wheel && \ + auditwheel repair dist/*.whl --wheel-dir wheelhouse/;" + displayName: 'Running AArch64 wheel build' + env: + DOCKER_MULTIDICT_ROOT: "/home/multidict_root" + HOST_USER_ID: $(id -u) + - template: templates/step-store-dist.yml@templates + parameters: + folder: wheelhouse + - job: strategy: matrix: diff --git a/.azure-pipelines/stage-test.yml b/.azure-pipelines/stage-test.yml index 1ac2b667b..cf6b28385 100644 --- a/.azure-pipelines/stage-test.yml +++ b/.azure-pipelines/stage-test.yml @@ -122,3 +122,48 @@ stages: condition: ne(variables['codecov.token'], '') env: CODECOV_TOKEN: $(codecov.token) + + - job: + strategy: + matrix: + Py36-C-Arm64-Linux: + python.version: '3.6' + image: 'ubuntu-latest' + Py37-C-Arm64-Linux: + python.version: '3.7' + image: 'ubuntu-latest' + Py38-C-Arm64-Linux: + python.version: '3.8' + image: 'ubuntu-latest' + pool: + vmImage: 'ubuntu-latest' + + steps: + - checkout: self + submodules: true + clean: true + + - script: docker run --rm --privileged hypriot/qemu-register + displayName: 'Registering qemu' + - script: | + set -xeo pipefail + docker run -v $(pwd):"${DOCKER_MULTIDICT_ROOT}":rw,z \ + -e HOST_USER_ID \ + -e CODECOV_TOKEN \ + "arm64v8/ubuntu:bionic" \ + bash -c "cd $DOCKER_MULTIDICT_ROOT; + apt-get update -qq && apt-get install -qq $PYTHON python3-pip lib$PYTHON-dev git && \ + $PYTHON -m pip install --upgrade pip setuptools wheel pytest-azurepipelines && \ + $PYTHON setup.py install && \ + $PYTHON -m pip install -r requirements/pytest.txt && \ + $PYTHON -m pytest tests -vv && \ + $PYTHON -m coverage xml && \ + if [ CODECOV_TOKEN != '' ]; then + $PYTHON -m pip install codecov && $PYTHON -m codecov -f coverage.xml -X gcov + fi;" + displayName: 'Running AArch64 build' + env: + CODECOV_TOKEN: $(codecov.token) + DOCKER_MULTIDICT_ROOT: "/home/multidict_root" + HOST_USER_ID: $(id -u) + PYTHON: "python$(python.version)"