Skip to content

update travis ci to build arm64 wheels #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 44 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ matrix:
env:
- PYTHON_VERSION=2.7.15

- os: linux
arch: arm64-graviton2
virt: vm
group: edge
dist: focal
language: generic
env:
- PYTHON_VERSION=3.8.5

before_cache:
# Cleanup to avoid the cache to grow indefinitely as new package versions are released
# see https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
Expand All @@ -43,19 +52,47 @@ before_install:
if [[ "$TRAVIS_OS_NAME" == "osx" && "${PYTHON_VERSION}" == "3.7.8" ]]; then
brew install gettext
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python; fi
- python -m pip install --disable-pip-version-check --upgrade pip
- pip install -U scikit-ci scikit-ci-addons
- ci_addons --install ../addons
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python;
python -m pip install --disable-pip-version-check --upgrade pip
pip install -U scikit-ci scikit-ci-addons
ci_addons --install ../addons
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run --name python-ninja --rm -itd \
-v $(pwd):/io \
--env TRAVIS=True \
--env TRAVIS_OS_NAME="${TRAVIS_OS_NAME}" \
quay.io/pypa/manylinux2014_$(arch) bash
docker exec -it python-ninja /io/scripts/docker-build.sh ci_before_install
fi

install:
- ci install
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci install
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker exec -it python-ninja /io/scripts/docker-build.sh ci_install
fi

script:
- ci test
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci test
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker exec -it python-ninja /io/scripts/docker-build.sh ci_script
fi

after_success:
- ci after_test
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ci after_test
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker exec -it python-ninja /io/scripts/docker-build.sh ci_after_success
docker stop python-ninja
fi

deploy:
# deploy-release
Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON_DIR: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
PYTHON_ARCH: "32"
BLOCK: "0"

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
Expand All @@ -41,22 +41,22 @@ cache:
- C:\\cmake-3.6.2

init:
- python -m pip install -U scikit-ci scikit-ci-addons
- python -m ci_addons --install ../addons
- "%PYTHON_DIR%\\python.exe -m pip install -U scikit-ci scikit-ci-addons"
- "%PYTHON_DIR%\\python.exe -m ci_addons --install ../addons"

- ps: ../addons/appveyor/rolling-build.ps1

install:
- python -m ci install
- "%PYTHON_DIR%\\python.exe -m ci install"

build_script:
- python -m ci build
- "%PYTHON_DIR%\\python.exe -m ci build"

test_script:
- python -m ci test
- "%PYTHON_DIR%\\python.exe -m ci test"

after_test:
- python -m ci after_test
- "%PYTHON_DIR%\\python.exe -m ci after_test"

on_finish:
- ps: ../addons/appveyor/enable-worker-remote-access.ps1 -check_for_block
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake>=0.5.0,<=3.13.3
codecov>=2.0.5
coverage>=4.2
flake8>=3.0.4
Expand Down
33 changes: 33 additions & 0 deletions scripts/docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

set -e
set -x

MANYLINUX_PYTHON=cp38-cp38
export PATH="/opt/python/${MANYLINUX_PYTHON}/bin:$PATH"

cd /io

ci_before_install() {
/opt/python/${MANYLINUX_PYTHON}/bin/pip install scikit-ci scikit-ci-addons scikit-build
}

ci_install() {
/opt/python/${MANYLINUX_PYTHON}/bin/ci install
}
ci_script() {
/opt/python/${MANYLINUX_PYTHON}/bin/ci test
}
ci_after_success() {
/opt/python/${MANYLINUX_PYTHON}/bin/ci after_test
}


if [[ $1 == 'all' ]]; then
ci_before_install
ci_install
ci_script
ci_after_success
else
$1
fi