forked from aio-libs/multidict
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure pipeline support for arm64 using qemu
- Loading branch information
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
echo "exporting Mutlidict root directory" | ||
export MULTIDICT_ROOT=$(cd "$(dirname "$0")/.."; pwd;) | ||
|
||
echo "Installing build dependencies" | ||
yum install gcc gcc-c++ python3-devel wget make enchant-devel -y | ||
|
||
cd $MULTIDICT_ROOT | ||
export PATH='/opt/bin':${PATH} | ||
echo "standard path for different python versions" | ||
export PYTHON="/opt/_internal/cpython-$1*/bin/python" | ||
|
||
echo "Update pip" | ||
$PYTHON -m pip install --upgrade pip setuptools wheel | ||
if [ $? != "0" ]; then | ||
echo "Update pip failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Install itself" | ||
$PYTHON setup.py install | ||
if [ $? != "0" ]; then | ||
echo "Install itself failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Install dependencies" | ||
$PYTHON -m pip install -r requirements/pytest.txt | ||
if [ $? != "0" ]; then | ||
echo "Install dependencies failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Install pytest-azurepipelines" | ||
$PYTHON -m pip install pytest-azurepipelines | ||
if [ $? != "0" ]; then | ||
echo "Install pytest-azurepipelines failed" | ||
exit 1 | ||
fi | ||
|
||
echo "pytest" | ||
$PYTHON -m pytest tests -vv | ||
if [ $? != "0" ]; then | ||
echo "pytest failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Prepare coverage" | ||
$PYTHON -m coverage xml | ||
if [ $? != "0" ]; then | ||
echo "Prepare coverage failed" | ||
exit 1 | ||
fi | ||
|
||
if [ CODECOV_TOKEN != '' ]; then | ||
echo "Install codecov" | ||
$PYTHON -m pip install codecov | ||
if [ $? != "0" ]; then | ||
echo "Install codecov failed" | ||
exit 1 | ||
fi | ||
echo "Upload coverage reports" | ||
$PYTHON -m codecov -f coverage.xml -X gcov | ||
if [ $? != "0" ]; then | ||
echo "Upload coverage reports failed" | ||
exit 1 | ||
fi | ||
else | ||
echo "code coverage upload is not intended" | ||
fi | ||
echo "test complete" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ variables: | |
stages: | ||
- template: stage-lint.yml | ||
- template: stage-test.yml | ||
- template: stage-aarch64.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
stages: | ||
- stage: azure_linux_test | ||
displayName: 'azure-aarch64' | ||
|
||
jobs: | ||
- job: 'arm64' | ||
strategy: | ||
matrix: | ||
Py35-C-Linux: | ||
python.version: '3.5' | ||
no_extensions: '' | ||
image: 'ubuntu-latest' | ||
Py36-C-Linux: | ||
python.version: '3.6' | ||
no_extensions: '' | ||
image: 'ubuntu-latest' | ||
Py37-C-Linux: | ||
python.version: '3.7' | ||
no_extensions: '' | ||
image: 'ubuntu-latest' | ||
Py38-C-Linux: | ||
python.version: '3.8' | ||
no_extensions: '' | ||
image: 'ubuntu-latest' | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
steps: | ||
- checkout: self | ||
submodules: true | ||
clean: true | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
architecture: 'x64' | ||
|
||
- script: docker run --rm --privileged hypriot/qemu-register | ||
displayName: 'Regietering qemu' | ||
- script: | | ||
export DOCKER_IMAGE=quay.io/pypa/manylinux2014_aarch64 | ||
set -xeo pipefail | ||
export MULTIDICT_ROOT=`pwd` | ||
export HOST_USER_ID=$(id -u) | ||
docker run -v "${MULTIDICT_ROOT}":/home/multidict_root:rw,z \ | ||
-e HOST_USER_ID \ | ||
-e CODECOV_TOKEN \ | ||
$DOCKER_IMAGE \ | ||
bash /home/multidict_root/.azure-pipelines/azure_aarch64_script/test_steps.sh "$(python.version)" | ||
displayName: 'Running AArch64 build' | ||
env: | ||
CODECOV_TOKEN: $(codecov.token) |