Skip to content

Commit

Permalink
Azure pipeline support for arm64 using qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
odidev committed Aug 26, 2020
1 parent c2d816e commit 85ef572
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ variables:
stages:
- template: stage-lint.yml
- template: stage-test.yml
- template: stage-test-aarch64.yml
45 changes: 45 additions & 0 deletions .azure-pipelines/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
45 changes: 45 additions & 0 deletions .azure-pipelines/stage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

0 comments on commit 85ef572

Please sign in to comment.