Unverified Commit fd6a4c39 authored by xoviat's avatar xoviat Committed by GitHub
Browse files

[library_builders] use brew to install openblas (#68)

* [library_builders] use brew to install openblas

Yields better performance on OSX

* [tst:library_builders] add openblas

* [tst:library_builders] update homebrew

* fix bash

* [library_builders] force openblas link
parent d98a52a7
......@@ -93,15 +93,20 @@ function build_github {
function build_openblas {
if [ -e openblas-stamp ]; then return; fi
if [ -d "OpenBLAS" ]; then
(cd OpenBLAS && git clean -fxd && git reset --hard)
if [ -n "$IS_OSX" ]; then
brew install openblas
brew link --force openblas
else
git clone https://github.com/xianyi/OpenBLAS
if [ -d "OpenBLAS" ]; then
(cd OpenBLAS && git clean -fxd && git reset --hard)
else
git clone https://github.com/xianyi/OpenBLAS
fi
(cd OpenBLAS \
&& git checkout "v${OPENBLAS_VERSION}" \
&& make DYNAMIC_ARCH=1 USE_OPENMP=0 NUM_THREADS=64 > /dev/null \
&& make PREFIX=$BUILD_PREFIX install)
fi
(cd OpenBLAS \
&& git checkout "v${OPENBLAS_VERSION}" \
&& make DYNAMIC_ARCH=1 USE_OPENMP=0 NUM_THREADS=64 > /dev/null \
&& make PREFIX=$BUILD_PREFIX install)
touch openblas-stamp
}
......
......@@ -6,14 +6,22 @@ source library_builders.sh
# set -e -x
function print_failure {
cat $HOME/suppress.out
exit 1
}
function suppress {
# Suppress the output of a bash command unless it fails
rm -f $HOME/suppress.out 2> /dev/null || true
$* 2>&1 > $HOME/suppress.out || cat $HOME/suppress.out
$* 2>&1 > $HOME/suppress.out || print_failure
rm $HOME/suppress.out
}
if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
suppress build_openssl
suppress build_openblas
suppress build_libwebp
suppress build_szip
suppress build_swig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment