-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
109 lines (99 loc) · 4.08 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
sudo: false
language:
- cpp
env:
global:
- secure: "ReYURSvDLRz078njJgh2i/KvwLc/3fGPkgjf6mLLoHWgz7vSuh24B5z10Th2UMQo9op66qcZ2WcooYIqeEHGbmYuBGGKd2axsGUEXqoclG9SdNsa5BoCA9iiLlLiMgIO+Kp1EuSbWcrpVRs/BiXya1iN+lpBErsWHGaXJP8idexnCepMLYgzUDu/FNuZJwRHMX1cvqK7wxOkCwXJRqEfbA+fn1/oCb+YAPpEet12kFNu1RRk6g+ui7g5XuAVHISj+UHbr5+GNYR6gD8476EkjUm38ssnPKxTvydj1QXcEw6weRDpevFByum5fDf2vHgojo5dNvhIio4gENkfbwbd2azVitHtE7boByb/AO3z3YcFhDRu0ETgCEZWIDrQWwkAubf+sB2MWyKGCPGQaECrVGDD2JzV6kX0lMCVaPQONggFBmJQwcHodLxXurpupmttJ+W4aZf5EsQsGPIYNegMnkdHAgTHxuPUtyDIlOJfTrUt1qPRh+yKGvmX7/C+AirXFIbxOemTdx3w0Y3CbhVxP2jDoP45rPzC17EI06gdQJaWzx5//LKkwcsAmox0bXrKHDOuMJNWVA6ZhBd3fGascMh4tgdSYc9yuRyAb0ygP0obUXp6PXU0TFxeenCaA9YAZrg6OXzS115lcnak8Xfyi+fmlfjrT8BSVk9bL9/3t2I="
matrix:
include:
- os: linux
env:
- BACKEND=OpenBLAS
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libopenblas-base
- libopenblas-dev
- os: linux
env:
- BACKEND=ATLAS
addons:
sources:
- ubuntu-toolchain-r-test
apt:
packages:
- libatlas-base-dev
- os: linux
env:
- BACKEND=Intel10_64lp_seq
- os: osx
env:
- BACKEND=Apple
- os: osx
env:
- BACKEND=Intel10_64lp_seq
before_install:
# Dependencies required by the CI are installed in ${TRAVIS_BUILD_DIR}/deps/
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p "${DEPS_DIR}"
# Travis machines have 2 cores
- JOBS=2
- cd "${DEPS_DIR}"
############################################################################
# Install a recent CMake (unless already installed on OS X)
############################################################################
- CMAKE_VERSION=3.10.1
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v${CMAKE_VERSION%.[0-9]}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew install cmake || brew upgrade cmake
fi
- which cmake
- cmake --version
############################################################################
# Install MKL
############################################################################
- |
if [[ "${BACKEND}" == "Intel10_64lp_seq" ]]; then
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export MKL_INSTALL_DIR=$(pwd)/intel
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12070/l_mkl_2018.0.128.tgz
tar -xzf l_mkl_2018.0.128.tgz
cat l_mkl_2018.0.128/silent.cfg | grep -v EULA | grep -v PSET_INSTALL_DIR > silent.cfg
echo "ACCEPT_EULA=accept" >> silent.cfg
echo "PSET_INSTALL_DIR=${MKL_INSTALL_DIR}" >> silent.cfg
./l_mkl_2018.0.128/install.sh --user-mode -s ./silent.cfg
export LD_LIBRARY_PATH="${MKL_INSTALL_DIR}/mkl/lib/intel64/:${LD_LIBRARY_PATH}"
. ${MKL_INSTALL_DIR}/mkl/bin/mklvars.sh intel64 ilp64
else # Mac
export MKL_INSTALL_DIR=/opt/intel
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12185/m_mkl_2017.4.220.dmg
hdiutil attach m_mkl_2017.4.220.dmg
cat /Volumes/m_mkl_2017.4.220/m_mkl_2017.4.220.app/Contents/MacOS/silent.cfg | grep -v EULA | grep -v PSET_INSTALL_DIR > silent.cfg
echo "ACCEPT_EULA=accept" >> silent.cfg
echo "PSET_INSTALL_DIR=${MKL_INSTALL_DIR}" >> silent.cfg
sudo /Volumes/m_mkl_2017.4.220/m_mkl_2017.4.220.app/Contents/MacOS/install.sh -s ./silent.cfg
. /opt/intel/mkl/bin/mklvars.sh intel64 ilp64
fi
fi
script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir -p build && cd build
- echo "cmake .. -DBLAS_VENDOR=$BACKEND"
- cmake .. -DCMAKE_CXX_STANDARD=11 -DBLA_VENDOR=$BACKEND
- cmake --build .
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
ldd ./CMakeHelloWorld
else # Mac
otool -L ./CMakeHelloWorld
fi
after_success:
- ./CMakeHelloWorld
notifications:
email: false