diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a58c361 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,115 @@ +env: + global: + - REPO_DIR=numpy + # Also see CRON_COMMIT below + - BUILD_COMMIT=master + - BUILD_DEPENDS=cython==0.29.16 + - TEST_DEPENDS="pytest hypothesis cffi pytz" + # Commit when running from cron job + - CRON_COMMIT=master + - EXTRA_ARGV="'--disable-pytest-warnings'" + +language: python +dist: bionic +services: docker +os: linux + +jobs: + include: + - os: linux + arch: x86_64 + env: + - MB_PYTHON_VERSION=pypy3.6-7.3.1 + - MB_ML_VER=2010 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + + # The manylinux2014 arm64 image has libbz2.so.1 and libbz.so.1.0.6 but not + # libbz2.so.1.0, leading to this error: + # pypy3.6-v7.3.1-aarch64/bin/pypy: error while loading shared libraries: + # libbz2.so.1.0: cannot open shared object file: No such file or directory + #- os: linux + # arch: arm64 + # env: + # - PLAT=aarch64 + # - MB_ML_VER=2014 + # - MB_PYTHON_VERSION=pypy3.6-7.3.1 + # - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + + # The pypy3 package has bin/pypy3 not bin/pypy, so multibuild/common_utils.sh + # has a "ln" command (not "ln -s"). Apparently it does not work, we get the + # error message: + # multibuild/common_utils.sh: line 476: + # /Users/travis/build/MacPython/numpy-wheels/pypy3.6-v7.3.1-linux64/bin/pypy: + # cannot execute binary file + - os: osx + language: generic + env: + - MB_PYTHON_VERSION=pypy3.6-7.3.1 + - MB_PYTHON_OSX_VER=10.9 + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.6 + - DEBUG_PRINT=1 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.8 + - DEBUG_PRINT=1 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=2014 + - MB_PYTHON_VERSION=3.7 + - DEBUG_PRINT=1 + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + +before_install: + - if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then + CONTAINER="pre-release"; + BUILD_COMMIT=${CRON_COMMIT}; + NPY_RELAXED_STRIDES_DEBUG=1; + else + CONTAINER=wheels; + fi + # Set DEBUG_PRINT environment variable in settings + - if [ -n "${DEBUG_PRINT}" ]; then set -x; fi + - source multibuild/common_utils.sh + - source multibuild/travis_steps.sh + - source extra_functions.sh + - before_install + +install: + # Maybe get and clean and patch source + - clean_code $REPO_DIR $BUILD_COMMIT + - ./patch_code.sh $REPO_DIR + - build_wheel $REPO_DIR $PLAT + +script: + - install_run $PLAT + +after_success: + # trigger an upload to the shared ecosystem + # infrastructure at: https://anaconda.org/scipy-wheels-nightly + # for cron jobs only (restricted to master branch once + # per week) + # The tokens are set from + # https://travis-ci.org/github/MacPython/numpy-wheels/settings + # originally generated at + # anaconda.org/scipy-wheels-nightly/settings/access + - if [ "$TRAVIS_BRANCH" == "master" ]; then + ANACONDA_ORG="scipy-wheels-nightly"; + TOKEN=${NUMPY_NIGHTLY_UPLOAD_TOKEN}; + else + ANACONDA_ORG="multibuild-wheels-staging"; + TOKEN=${NUMPY_STAGING_UPLOAD_TOKEN}; + fi + - pip install git+https://github.com/Anaconda-Server/anaconda-client + - anaconda -t ${TOKEN} upload u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl; diff --git a/.travis.yml.back b/.travis.yml.back deleted file mode 100644 index fcf26e3..0000000 --- a/.travis.yml.back +++ /dev/null @@ -1,113 +0,0 @@ -env: - global: - - REPO_DIR=numpy - # Also see DAILY_COMMIT below - - BUILD_COMMIT=e94cec800304a6a467cf90ce4e7d3e207770b4b4 - - BUILD_DEPENDS=cython - - TEST_DEPENDS="pytest hypothesis" - - WHEELHOUSE_UPLOADER_USERNAME=travis-worker - # Following generated with - # travis encrypt -r MacPython/numpy-wheels WHEELHOUSE_UPLOADER_SECRET= - - secure: - "FEFwGNflXOjuNjv4f2oOq0m8I3b6OvG5AVV/tH9Fsr6jtPNwQOx7PMOVzISBrWfAueeFubz/IapXBeDP8fRio9RVOcEHBhVJQYeJ46VubOx4X/4pRUD7ehGLxjYK30BGVdNh7z/tL6Xr5+iCuxxmOBgirG0pQVeBZXDchPJaUK0=" - # Commit when running from daily branch - - DAILY_COMMIT=master - - EXTRA_ARGV="'--disable-pytest-warnings'" - -language: python -dist: bionic -services: docker -os: linux - -jobs: - include: - - os: linux - env: - - MB_PYTHON_VERSION=3.6 - - MB_ML_VER=2010 - - PLAT=x86_64 - - os: linux - env: - - MB_PYTHON_VERSION=3.6 - - MB_ML_VER=2010 - - PLAT=i686 - - ENV_VARS_PATH=env_vars_32.sh - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - os: linux - env: - - MB_PYTHON_VERSION=3.7 - - MB_ML_VER=2010 - - PLAT=x86_64 - - os: linux - env: - - MB_PYTHON_VERSION=3.7 - - MB_ML_VER=2010 - - PLAT=i686 - - ENV_VARS_PATH=env_vars_32.sh - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - os: linux - env: - - MB_PYTHON_VERSION=3.8 - - MB_ML_VER=2010 - - PLAT=x86_64 - - os: linux - env: - - MB_PYTHON_VERSION=3.8 - - MB_ML_VER=2010 - - PLAT=i686 - - ENV_VARS_PATH=env_vars_32.sh - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - os: osx - language: generic - osx_image: xcode10.1 - env: - - MB_PYTHON_VERSION=3.6 - - MB_PYTHON_OSX_VER=10.9 - - os: osx - language: generic - osx_image: xcode10.1 - env: - - MB_PYTHON_VERSION=3.7 - - MB_PYTHON_OSX_VER=10.9 - - os: osx - language: generic - osx_image: xcode10.1 - env: - - MB_PYTHON_VERSION=3.8 - - MB_PYTHON_OSX_VER=10.9 - -before_install: - - if [ "$TRAVIS_BRANCH" == "master" ]; then - CONTAINER="pre-release"; - BUILD_COMMIT=${DAILY_COMMIT:-$BUILD_COMMIT}; - NPY_RELAXED_STRIDES_DEBUG=1; - else - CONTAINER=wheels; - UPLOAD_ARGS="--no-update-index"; - fi - # Set DEBUG_PRINT environment variable in settings - - if [ -n "${DEBUG_PRINT}" ]; then set -x; fi - - source multibuild/common_utils.sh - - source multibuild/travis_steps.sh - - before_install - -install: - # Maybe get and clean and patch source - - clean_code $REPO_DIR $BUILD_COMMIT - - ./patch_code.sh $REPO_DIR - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - export CFLAGS=${CFLAGS}" -Wno-sign-compare -Wno-unused-result\ - -Wno-strict-aliasing"; - fi - - build_wheel $REPO_DIR $PLAT - -script: - - install_run $PLAT - -after_success: - # Upload wheels to Rackspace container - - pip install wheelhouse-uploader - - python -m wheelhouse_uploader upload --local-folder - ${TRAVIS_BUILD_DIR}/wheelhouse/ - $UPLOAD_ARGS - $CONTAINER diff --git a/config.sh b/config.sh index 052ba3f..b19f891 100644 --- a/config.sh +++ b/config.sh @@ -21,9 +21,9 @@ function build_libs { # download and un-tar the openblas libraries. The python call returns # the un-tar root directory, then the files are copied into /usr/local. # Could utilize a site.cfg instead to prevent the copy. - python -mpip install urllib3 - python -c"import platform; print('platform.uname().machine', platform.uname().machine)" - basedir=$(python numpy/tools/openblas_support.py) + $PYTHON_EXE -mpip install urllib3 + $PYTHON_EXE -c"import platform; print('platform.uname().machine', platform.uname().machine)" + basedir=$($PYTHON_EXE numpy/tools/openblas_support.py) $use_sudo cp -r $basedir/lib/* /usr/local/lib $use_sudo cp $basedir/include/* /usr/local/include } @@ -43,13 +43,9 @@ function run_tests { $PYTHON_EXE -c "$(get_test_cmd)" # Check bundled license file $PYTHON_EXE ../check_license.py - # Show BLAS / LAPACK used. Assumes this is one-directory-in - # so we can find tools/openblas_config.py; - if [ -e ../numpy/tools/openblas_support.py ]; then + # Test BLAS / LAPACK used + if [ -n "$IS_LINUX" -o -n "$IS_OSX" ]; then $PYTHON_EXE ../numpy/tools/openblas_support.py --check_version - else - echo could not find ../numpy, ls -d .. is - ls -d .. fi $PYTHON_EXE -c 'import numpy; numpy.show_config()' } diff --git a/env_vars_32.sh b/env_vars_32.sh index 3f02e87..7136cea 100644 --- a/env_vars_32.sh +++ b/env_vars_32.sh @@ -4,7 +4,10 @@ # compile sse loops for ufuncs. set -x MACOSX_DEPLOYMENT_TARGET=10.9 -CFLAGS="-msse2 -std=c99 -fno-strict-aliasing" + +# Fails test_umath.TestAVXUfuncs with reciprocal on Azure +# CFLAGS="-msse2 -std=c99 -fno-strict-aliasing" +CFLAGS="-std=c99 -fno-strict-aliasing" # Macos's linker doesn't support stripping symbols if [ "$(uname)" != "Darwin" ]; then LDFLAGS="-Wl,--strip-debug" diff --git a/multibuild b/multibuild index 2a3f785..35fbf1f 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 2a3f785096d791a5cd07c4320a041e37a055be5c +Subproject commit 35fbf1f828595209876b75c2363c104d954e173e