From d1bde17bfae6925aaf177f9c9c8d8cfebf954af8 Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 2 Aug 2020 10:18:59 +0300 Subject: [PATCH] add arm64 builds, refactor to use multibuild --- .travis.yml | 87 +++++++++++++++++++++++++++++++++-------------------- env_vars.sh | 3 ++ multibuild | 2 +- 3 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 env_vars.sh diff --git a/.travis.yml b/.travis.yml index 83a0c867..2a332d08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,67 +2,88 @@ if: tag IS present language: generic sudo: required +services: docker +dist: bionic env: - global: - - DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64 matrix: include: - os: linux - services: - - docker - env: MB_PYTHON_VERSION=3.5 + env: + - MB_PYTHON_VERSION=3.5 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - os: linux - services: - - docker - env: MB_PYTHON_VERSION=3.6 + env: + - MB_PYTHON_VERSION=3.6 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - os: linux - services: - - docker - env: MB_PYTHON_VERSION=3.7 + env: + - MB_PYTHON_VERSION=3.7 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - os: linux - services: - - docker - env: MB_PYTHON_VERSION=3.8 + env: + - MB_PYTHON_VERSION=3.8 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + - os: osx - env: MB_PYTHON_VERSION=3.5 + env: + - MB_PYTHON_VERSION=3.5 - os: osx - env: MB_PYTHON_VERSION=3.6 + env: + - MB_PYTHON_VERSION=3.6 - os: osx - env: MB_PYTHON_VERSION=3.7 + env: + - MB_PYTHON_VERSION=3.7 - os: osx env: - MB_PYTHON_VERSION=3.8 - MB_PYTHON_OSX_VER=10.9 - MB_ML_VER=2010 + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.6 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.7 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.8 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + before_install: | set -e - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - docker pull $DOCKER_IMAGE - elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - source multibuild/common_utils.sh - source multibuild/travis_steps.sh - before_install - fi + source multibuild/common_utils.sh + source multibuild/travis_steps.sh + before_install install: | # Output something every 10 minutes or Travis kills the job while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done & bg_pid=$! - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/build-linux-wheels.sh $MB_PYTHON_VERSION - elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - export MYPY_USE_MYPYC=1 - export MYPYC_OPT_LEVEL=3 - clean_code mypy HEAD - build_bdist_wheel mypy x86_64 - (cd mypy && ./misc/test_installed_version.sh ../wheelhouse/*.whl) - fi + clean_code mypy HEAD + # Uses env_vars.sh inside the docker when building + build_bdist_wheel $REPO_DIR $PLAT kill $bg_pid +script: + - install_run $PLAT + notifications: email: recipients: diff --git a/env_vars.sh b/env_vars.sh new file mode 100644 index 00000000..178d3486 --- /dev/null +++ b/env_vars.sh @@ -0,0 +1,3 @@ +export MYPY_USE_MYPYC=1 +export MYPYC_OPT_LEVEL=3 + diff --git a/multibuild b/multibuild index dc357469..c2890dc8 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit dc357469cc8477b8cf4ef407b06eccb58fa8dde0 +Subproject commit c2890dc8dc93f99b0eadd76f87aa181f6aea42da