diff --git a/.travis.yml b/.travis.yml index 7011f04..d0033b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/appveyor.yml b/appveyor.yml index 5ceb92b..ee382b4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 @@ -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 diff --git a/requirements-dev.txt b/requirements-dev.txt index 2cb8a6e..fa1c5ad 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,3 @@ -cmake>=0.5.0,<=3.13.3 codecov>=2.0.5 coverage>=4.2 flake8>=3.0.4 diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh new file mode 100755 index 0000000..2dbd71b --- /dev/null +++ b/scripts/docker-build.sh @@ -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