Skip to content

BLD: add ppc64le, aarch64, s390x builds #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 2, 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
43 changes: 41 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ env:
# commit.
- BUILD_COMMIT=c815b8f
- REPO_DIR=OpenBLAS
- PLAT=x86_64
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
# Following generated with
# travis encrypt -r MacPython/openblas-libs WHEELHOUSE_UPLOADER_SECRET=<the api key>
Expand All @@ -15,28 +14,68 @@ env:

language: python
sudo: required
dist: trusty
dist: xenial
services: docker

matrix:
include:
- os: linux
env:
- PLAT=x86_64
- os: linux
env:
- PLAT=i686
- os: osx
language: objective-c
env:
- PLAT=x86_64
- os: osx
language: objective-c
env:
- PLAT=i686
- os: linux
env:
- PLAT=x86_64
- INTERFACE64=1
- os: osx
language: objective-c
env:
- PLAT=x86_64
- INTERFACE64=1
- os: linux
arch: arm64
env:
- PLAT=aarch64
- MB_ML_VER=2014
# causes a segfault
# - os: linux
# arch: arm64
# env:
# - PLAT=aarch64
# - INTERFACE64=1
# - MB_ML_VER=2014
- os: linux
arch: s390x
env:
- PLAT=s390x
- MB_ML_VER=2014
- os: linux
arch: s390x
env:
- PLAT=s390x
- INTERFACE64=1
- MB_ML_VER=2014
- os: linux
arch: ppc64le
env:
- PLAT=ppc64le
- MB_ML_VER=2014
- os: linux
arch: ppc64le
env:
- PLAT=ppc64le
- INTERFACE64=1
- MB_ML_VER=2014

before_install:
- source travis-ci/build_steps.sh
Expand Down
2 changes: 1 addition & 1 deletion OpenBLAS
2 changes: 1 addition & 1 deletion gfortran-install
16 changes: 12 additions & 4 deletions travis-ci/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,27 @@ function build_lib {
# Depends on globals
# BUILD_PREFIX - install suffix e.g. "/usr/local"
# GFORTRAN_DMG
# MB_ML_VER
set -x
local plat=${1:-$PLAT}
local interface64=${2:-$INTERFACE64}
local manylinux=${MB_ML_VER:-1}
# Make directory to store built archive
if [ -n "$IS_OSX" ]; then
# Do build, add gfortran hash to end of name
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64"
return
fi
# Manylinux wrapper
local docker_image=quay.io/pypa/manylinux1_$plat
local docker_image=quay.io/pypa/manylinux${manylinux}_${plat}
docker pull $docker_image
# Docker sources this script, and runs `do_build_lib`
docker run --rm \
-e BUILD_PREFIX="$BUILD_PREFIX" \
-e PLAT="${plat}" \
-e INTERFACE64="${interface64}" \
-e PYTHON_VERSION="$MB_PYTHON_VERSION" \
-e MB_ML_VER=${manylinux} \
-v $PWD:/io \
$docker_image /io/travis-ci/docker_build_wrap.sh
}
Expand Down Expand Up @@ -84,6 +88,9 @@ function do_build_lib {
case $plat in
x86_64) local bitness=64 ;;
i686) local bitness=32 ;;
aarch64) local bitness=64 ;;
s390x) local bitness=64 ;;
ppc64le) local bitness=64 ;;
*) echo "Strange plat value $plat"; exit 1 ;;
esac
case $interface64 in
Expand All @@ -101,23 +108,24 @@ function do_build_lib {
esac
mkdir -p libs
start_spinner
set -x
(cd OpenBLAS \
&& patch_source \
&& make DYNAMIC_ARCH=1 USE_OPENMP=0 NUM_THREADS=64 BINARY=$bitness $interface64_flags > /dev/null \
&& make PREFIX=$BUILD_PREFIX $interface64_flags install )
stop_spinner
local version=$(cd OpenBLAS && git describe --tags)
local plat_tag=$(get_distutils_platform $plat)
local plat_tag=$(get_distutils_platform_ex $plat)
local suff=""
[ -n "$suffix" ] && suff="-$suffix"
if [ "$interface64" = "1" ]; then
# OpenBLAS does not install the symbol suffixed static library,
# do it ourselves
static_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a'`)
renamed_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.renamed'`)
set -x # echo commands
# set -x # echo commands
cp -f "OpenBLAS/${renamed_libname}" "$BUILD_PREFIX/lib/${static_libname}"
set +x
# set +x
fi
local out_name="openblas${symbolsuffix}-${version}-${plat_tag}${suff}.tar.gz"
tar zcvf libs/$out_name \
Expand Down