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

Commit 5f5fa09

Browse files
committed
WIP: revamp travis.yml for pypy, aarch64
1 parent 8d0ac38 commit 5f5fa09

File tree

5 files changed

+125
-124
lines changed

5 files changed

+125
-124
lines changed

.travis.yml

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
env:
2+
global:
3+
- REPO_DIR=numpy
4+
# Also see CRON_COMMIT below
5+
- BUILD_COMMIT=master
6+
- BUILD_DEPENDS=cython==0.29.16
7+
- TEST_DEPENDS="pytest hypothesis cffi pytz"
8+
# Commit when running from cron job
9+
- CRON_COMMIT=master
10+
- EXTRA_ARGV="'--disable-pytest-warnings'"
11+
12+
language: python
13+
dist: bionic
14+
services: docker
15+
os: linux
16+
17+
jobs:
18+
include:
19+
- os: linux
20+
arch: x86_64
21+
env:
22+
- MB_PYTHON_VERSION=pypy3.6-7.3.1
23+
- MB_ML_VER=2010
24+
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
25+
26+
# The manylinux2014 arm64 image has libbz2.so.1 and libbz.so.1.0.6 but not
27+
# libbz2.so.1.0, leading to this error:
28+
# pypy3.6-v7.3.1-aarch64/bin/pypy: error while loading shared libraries:
29+
# libbz2.so.1.0: cannot open shared object file: No such file or directory
30+
#- os: linux
31+
# arch: arm64
32+
# env:
33+
# - PLAT=aarch64
34+
# - MB_ML_VER=2014
35+
# - MB_PYTHON_VERSION=pypy3.6-7.3.1
36+
# - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
37+
38+
# The pypy3 package has bin/pypy3 not bin/pypy, so multibuild/common_utils.sh
39+
# has a "ln" command (not "ln -s"). Apparently it does not work, we get the
40+
# error message:
41+
# multibuild/common_utils.sh: line 476:
42+
# /Users/travis/build/MacPython/numpy-wheels/pypy3.6-v7.3.1-linux64/bin/pypy:
43+
# cannot execute binary file
44+
- os: osx
45+
language: generic
46+
env:
47+
- MB_PYTHON_VERSION=pypy3.6-7.3.1
48+
- MB_PYTHON_OSX_VER=10.9
49+
- os: linux
50+
arch: arm64
51+
env:
52+
- PLAT=aarch64
53+
- MB_ML_VER=2014
54+
- MB_PYTHON_VERSION=3.6
55+
- DEBUG_PRINT=1
56+
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
57+
- os: linux
58+
arch: arm64
59+
env:
60+
- PLAT=aarch64
61+
- MB_ML_VER=2014
62+
- MB_PYTHON_VERSION=3.8
63+
- DEBUG_PRINT=1
64+
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
65+
- os: linux
66+
arch: arm64
67+
env:
68+
- PLAT=aarch64
69+
- MB_ML_VER=2014
70+
- MB_PYTHON_VERSION=3.7
71+
- DEBUG_PRINT=1
72+
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
73+
74+
before_install:
75+
- if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then
76+
CONTAINER="pre-release";
77+
BUILD_COMMIT=${CRON_COMMIT};
78+
NPY_RELAXED_STRIDES_DEBUG=1;
79+
else
80+
CONTAINER=wheels;
81+
fi
82+
# Set DEBUG_PRINT environment variable in settings
83+
- if [ -n "${DEBUG_PRINT}" ]; then set -x; fi
84+
- source multibuild/common_utils.sh
85+
- source multibuild/travis_steps.sh
86+
- source extra_functions.sh
87+
- before_install
88+
89+
install:
90+
# Maybe get and clean and patch source
91+
- clean_code $REPO_DIR $BUILD_COMMIT
92+
- ./patch_code.sh $REPO_DIR
93+
- build_wheel $REPO_DIR $PLAT
94+
95+
script:
96+
- install_run $PLAT
97+
98+
after_success:
99+
# trigger an upload to the shared ecosystem
100+
# infrastructure at: https://anaconda.org/scipy-wheels-nightly
101+
# for cron jobs only (restricted to master branch once
102+
# per week)
103+
# The tokens are set from
104+
# https://travis-ci.org/github/MacPython/numpy-wheels/settings
105+
# originally generated at
106+
# anaconda.org/scipy-wheels-nightly/settings/access
107+
- if [ "$TRAVIS_BRANCH" == "master" ]; then
108+
ANACONDA_ORG="scipy-wheels-nightly";
109+
TOKEN=${NUMPY_NIGHTLY_UPLOAD_TOKEN};
110+
else
111+
ANACONDA_ORG="multibuild-wheels-staging";
112+
TOKEN=${NUMPY_STAGING_UPLOAD_TOKEN};
113+
fi
114+
- pip install git+https://github.com/Anaconda-Server/anaconda-client
115+
- anaconda -t ${TOKEN} upload u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl;

.travis.yml.back

-113
This file was deleted.

config.sh

+5-9
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function build_libs {
2121
# download and un-tar the openblas libraries. The python call returns
2222
# the un-tar root directory, then the files are copied into /usr/local.
2323
# Could utilize a site.cfg instead to prevent the copy.
24-
python -mpip install urllib3
25-
python -c"import platform; print('platform.uname().machine', platform.uname().machine)"
26-
basedir=$(python numpy/tools/openblas_support.py)
24+
$PYTHON_EXE -mpip install urllib3
25+
$PYTHON_EXE -c"import platform; print('platform.uname().machine', platform.uname().machine)"
26+
basedir=$($PYTHON_EXE numpy/tools/openblas_support.py)
2727
$use_sudo cp -r $basedir/lib/* /usr/local/lib
2828
$use_sudo cp $basedir/include/* /usr/local/include
2929
}
@@ -43,13 +43,9 @@ function run_tests {
4343
$PYTHON_EXE -c "$(get_test_cmd)"
4444
# Check bundled license file
4545
$PYTHON_EXE ../check_license.py
46-
# Show BLAS / LAPACK used. Assumes this is one-directory-in
47-
# so we can find tools/openblas_config.py;
48-
if [ -e ../numpy/tools/openblas_support.py ]; then
46+
# Test BLAS / LAPACK used
47+
if [ -n "$IS_LINUX" -o -n "$IS_OSX" ]; then
4948
$PYTHON_EXE ../numpy/tools/openblas_support.py --check_version
50-
else
51-
echo could not find ../numpy, ls -d .. is
52-
ls -d ..
5349
fi
5450
$PYTHON_EXE -c 'import numpy; numpy.show_config()'
5551
}

env_vars_32.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# compile sse loops for ufuncs.
55
set -x
66
MACOSX_DEPLOYMENT_TARGET=10.9
7-
CFLAGS="-msse2 -std=c99 -fno-strict-aliasing"
7+
8+
# Fails test_umath.TestAVXUfuncs with reciprocal on Azure
9+
# CFLAGS="-msse2 -std=c99 -fno-strict-aliasing"
10+
CFLAGS="-std=c99 -fno-strict-aliasing"
811
# Macos's linker doesn't support stripping symbols
912
if [ "$(uname)" != "Darwin" ]; then
1013
LDFLAGS="-Wl,--strip-debug"

multibuild

0 commit comments

Comments
 (0)