Skip to content

Commit 4382c9e

Browse files
authored
Merge pull request #9 from mattip/other-archs
BLD: add ppc64le, aarch64, s390x builds
2 parents dc05141 + 0128261 commit 4382c9e

File tree

5 files changed

+56
-9
lines changed

5 files changed

+56
-9
lines changed

.travis.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ env:
44
# commit.
55
- BUILD_COMMIT=c815b8f
66
- REPO_DIR=OpenBLAS
7-
- PLAT=x86_64
87
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
98
# Following generated with
109
# travis encrypt -r MacPython/openblas-libs WHEELHOUSE_UPLOADER_SECRET=<the api key>
@@ -15,28 +14,68 @@ env:
1514

1615
language: python
1716
sudo: required
18-
dist: trusty
17+
dist: xenial
1918
services: docker
2019

2120
matrix:
2221
include:
2322
- os: linux
23+
env:
24+
- PLAT=x86_64
2425
- os: linux
2526
env:
2627
- PLAT=i686
2728
- os: osx
2829
language: objective-c
30+
env:
31+
- PLAT=x86_64
2932
- os: osx
3033
language: objective-c
3134
env:
3235
- PLAT=i686
3336
- os: linux
3437
env:
38+
- PLAT=x86_64
3539
- INTERFACE64=1
3640
- os: osx
3741
language: objective-c
3842
env:
43+
- PLAT=x86_64
44+
- INTERFACE64=1
45+
- os: linux
46+
arch: arm64
47+
env:
48+
- PLAT=aarch64
49+
- MB_ML_VER=2014
50+
# causes a segfault
51+
# - os: linux
52+
# arch: arm64
53+
# env:
54+
# - PLAT=aarch64
55+
# - INTERFACE64=1
56+
# - MB_ML_VER=2014
57+
- os: linux
58+
arch: s390x
59+
env:
60+
- PLAT=s390x
61+
- MB_ML_VER=2014
62+
- os: linux
63+
arch: s390x
64+
env:
65+
- PLAT=s390x
66+
- INTERFACE64=1
67+
- MB_ML_VER=2014
68+
- os: linux
69+
arch: ppc64le
70+
env:
71+
- PLAT=ppc64le
72+
- MB_ML_VER=2014
73+
- os: linux
74+
arch: ppc64le
75+
env:
76+
- PLAT=ppc64le
3977
- INTERFACE64=1
78+
- MB_ML_VER=2014
4079

4180
before_install:
4281
- source travis-ci/build_steps.sh

OpenBLAS

travis-ci/build_steps.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,27 @@ function build_lib {
3636
# Depends on globals
3737
# BUILD_PREFIX - install suffix e.g. "/usr/local"
3838
# GFORTRAN_DMG
39+
# MB_ML_VER
40+
set -x
3941
local plat=${1:-$PLAT}
4042
local interface64=${2:-$INTERFACE64}
43+
local manylinux=${MB_ML_VER:-1}
4144
# Make directory to store built archive
4245
if [ -n "$IS_OSX" ]; then
4346
# Do build, add gfortran hash to end of name
4447
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
4548
return
4649
fi
4750
# Manylinux wrapper
48-
local docker_image=quay.io/pypa/manylinux1_$plat
51+
local docker_image=quay.io/pypa/manylinux${manylinux}_${plat}
4952
docker pull $docker_image
5053
# Docker sources this script, and runs `do_build_lib`
5154
docker run --rm \
5255
-e BUILD_PREFIX="$BUILD_PREFIX" \
5356
-e PLAT="${plat}" \
5457
-e INTERFACE64="${interface64}" \
5558
-e PYTHON_VERSION="$MB_PYTHON_VERSION" \
59+
-e MB_ML_VER=${manylinux} \
5660
-v $PWD:/io \
5761
$docker_image /io/travis-ci/docker_build_wrap.sh
5862
}
@@ -84,6 +88,9 @@ function do_build_lib {
8488
case $plat in
8589
x86_64) local bitness=64 ;;
8690
i686) local bitness=32 ;;
91+
aarch64) local bitness=64 ;;
92+
s390x) local bitness=64 ;;
93+
ppc64le) local bitness=64 ;;
8794
*) echo "Strange plat value $plat"; exit 1 ;;
8895
esac
8996
case $interface64 in
@@ -101,23 +108,24 @@ function do_build_lib {
101108
esac
102109
mkdir -p libs
103110
start_spinner
111+
set -x
104112
(cd OpenBLAS \
105113
&& patch_source \
106114
&& make DYNAMIC_ARCH=1 USE_OPENMP=0 NUM_THREADS=64 BINARY=$bitness $interface64_flags > /dev/null \
107115
&& make PREFIX=$BUILD_PREFIX $interface64_flags install )
108116
stop_spinner
109117
local version=$(cd OpenBLAS && git describe --tags)
110-
local plat_tag=$(get_distutils_platform $plat)
118+
local plat_tag=$(get_distutils_platform_ex $plat)
111119
local suff=""
112120
[ -n "$suffix" ] && suff="-$suffix"
113121
if [ "$interface64" = "1" ]; then
114122
# OpenBLAS does not install the symbol suffixed static library,
115123
# do it ourselves
116124
static_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a'`)
117125
renamed_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.renamed'`)
118-
set -x # echo commands
126+
# set -x # echo commands
119127
cp -f "OpenBLAS/${renamed_libname}" "$BUILD_PREFIX/lib/${static_libname}"
120-
set +x
128+
# set +x
121129
fi
122130
local out_name="openblas${symbolsuffix}-${version}-${plat_tag}${suff}.tar.gz"
123131
tar zcvf libs/$out_name \

0 commit comments

Comments
 (0)