Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

add more wheels #74

Merged
merged 3 commits into from
May 13, 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
118 changes: 118 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
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 with pypy:
# 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 osx 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;
- if [ -n "${TOKEN}" ] ;then
anaconda -t ${TOKEN} upload u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl;
fi
113 changes: 0 additions & 113 deletions .travis.yml.back

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where user is the ``ANACONDA_ORG`` value in the ``yml`` files.
Triggering a build
==================

You will likely want to edit the ``azure/*`` files to
You will likely want to edit the ``azure-pipelines.yml`` files to
specify the ``BUILD_COMMIT`` before triggering a build - see below.

You will need write permission to the github repository to trigger new builds.
Expand All @@ -75,7 +75,7 @@ Which numpy commit does the repository build?

PRs merged to this repo from a fork, and commits directly pushed to this repo
will build the commit specified in the ``BUILD_COMMIT`` at the top of the
``azure/windows.yml`` and ``azure/posix.yml`` files, the wheels will be
``azure-pipelines.yml`` file, the wheels will be
uploaded to https://anaconda.org/multibuild-wheels-staging/numpy. The
``NIGHTLY_BUILD_COMMIT`` is built once a week (sorry for the misnomer),
and uploaded to https://anaconda.org/scipy-wheels-nightly/.
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ trigger:
pr:
- master

variables:
BUILD_COMMIT: "master"

jobs:
- template: azure/windows.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
vmImage: ${{ parameters.vmImage }}
variables:
REPO_DIR: "numpy"
BUILD_COMMIT: "master"
PLAT: "x86_64"
CYTHON_BUILD_DEP: "cython==0.29.16"
NIGHTLY_BUILD_COMMIT: "master"
Expand Down
1 change: 0 additions & 1 deletion azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
pool:
vmImage: ${{ parameters.vmImage }}
variables:
BUILD_COMMIT: "master"
NIGHTLY_BUILD_COMMIT: "master"
JUNITXML: "test-data.xml"
TEST_DIR: '$(Agent.WorkFolder)/tmp_for_test'
Expand Down
17 changes: 9 additions & 8 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ function build_wheel {
local lib_plat=$PLAT
if [ -n "$IS_OSX" ]; then
install_gfortran
else
# For manylinux2010 builds with manylinux1 openblas builds
$use_sudo yum install -y libgfortran-4.4.7
fi
echo gcc --version
echo `gcc --version`
build_libs $lib_plat
# Fix version error for development wheels by using bdist_wheel
build_bdist_wheel $@
Expand All @@ -22,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
}
Expand All @@ -44,7 +43,9 @@ function run_tests {
$PYTHON_EXE -c "$(get_test_cmd)"
# Check bundled license file
$PYTHON_EXE ../check_license.py
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
# tools/openblas_config.py; tools is not part of what is shipped
# Test BLAS / LAPACK used
if [ -n "$IS_LINUX" -o -n "$IS_OSX" ]; then
$PYTHON_EXE ../numpy/tools/openblas_support.py --check_version
fi
$PYTHON_EXE -c 'import numpy; numpy.show_config()'
}
4 changes: 3 additions & 1 deletion env_vars.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Environment variables for build
OPENBLAS_VERSION="v0.3.7"
MACOSX_DEPLOYMENT_TARGET=10.9
CFLAGS="-std=c99 -fno-strict-aliasing"
# Macos's linker doesn't support stripping symbols
Expand All @@ -13,3 +12,6 @@ if [ "$(uname)" != "Darwin" ]; then
# the current version of manybuild pass "-strip-all" to CPPFLAGS and FFLAGS
STRIP_FLAGS=""
fi
# For verbosity: report where each command came from
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x
4 changes: 2 additions & 2 deletions env_vars_32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# The important difference from the 64-bit build is `-msse2` to
# compile sse loops for ufuncs.
set -x
OPENBLAS_VERSION="v0.3.7"
MACOSX_DEPLOYMENT_TARGET=10.9
# Causes failure for pre-1.19 in np.reciprocal

# 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
Expand Down
2 changes: 1 addition & 1 deletion gfortran-install
2 changes: 1 addition & 1 deletion multibuild
Submodule multibuild updated 1 files
+1 −2 README.rst
Loading