-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
93 lines (90 loc) · 3.2 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
# General settings
notifications:
email: false
sudo: false
dist: trusty
# TODO:
# - build with Clang
# Build matrix
os:
- linux
# Building libraries via Spack takes too long for macOS and times out
# - osx
language: cpp
# Install, build, and test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- gcc-6
# - gfortran-6
# - libhwloc-dev
# - libopenmpi-dev
# - openmpi-bin
- libmpich-dev
- mpich
cache:
directories:
- $HOME/spack
before_cache:
- rm -f "$HOME"/spack/travis_wait_*.log
install:
- |
if [ "$TRAVIS_OS_NAME" = linux ]; then
export CC=gcc-6
export CXX=g++-6
# export FC=gfortran-6
export GCOV=gcov-6
export comp=gcc@6
export syscomp="$comp"
fi
- |
if [ "$TRAVIS_OS_NAME" = osx ]; then
brew update
brew install gcc@5
# brew install gfortran@5
export CC=gcc-5
export CXX=g++-5
# export FC=gfortran-5
export GCOV=gcov-5
export comp=gcc@5
export syscomp=clang
fi
- pushd "$HOME"
- curl -O https://curl.haxx.se/ca/cacert.pem && export CURL_CA_BUNDLE="$(pwd)/cacert.pem"
# The git repo might have been created from the cache
- git clone https://github.com/llnl/spack.git || true
- cd spack
- git fetch origin && git reset --hard origin/develop
- mkdir -p var/spack/repos/builtin/packages/funhpc && cp "$TRAVIS_BUILD_DIR"/package.py var/spack/repos/builtin/packages/funhpc/package.py
- source share/spack/setup-env.sh
- spack compilers
# - travis_wait 60 spack install -j2 --only dependencies funhpc %"$comp" ^openmpi ^pkg-config %"$syscomp"
- travis_wait 60 spack install -j2 --only dependencies funhpc %"$comp" ^hwloc @:1.999.999
- spack find
- spack view -d true hardlink "$HOME/spack-view" cereal
- spack view -d true hardlink "$HOME/spack-view" cmake
- spack view -d true hardlink "$HOME/spack-view" googletest
- spack view -d true hardlink "$HOME/spack-view" hwloc
- spack view -d true hardlink "$HOME/spack-view" jemalloc
# - spack view -d true hardlink "$HOME/spack-view" openmpi
- spack view -d true hardlink "$HOME/spack-view" qthreads
- export PATH="$HOME/spack-view/bin:$PATH"
- popd
script:
- mkdir build && pushd build
# - cmake -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_FIND_ROOT_PATH="$HOME/spack-view" -DGTEST_ROOT="$HOME/spack-view" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="$HOME/install" ..
- cmake -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_FIND_ROOT_PATH="$HOME/spack-view" -DGTEST_ROOT="$HOME/spack-view" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$HOME/install" ..
- make -j2
- make -j2 test CTEST_OUTPUT_ON_FAILURE=1
- make -j2 install
- popd
after_success:
- mkdir -p "$HOME/bin" && ln -s "$(which $GCOV)" "$HOME/bin/gcov" && ls -l "$HOME/bin" && export PATH="$HOME/bin:$PATH" && hash -r
- mkdir build-coveralls && pushd build-coveralls
- cmake -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_FIND_ROOT_PATH="$HOME/spack-view" -DGTEST_ROOT="$HOME/spack-view" -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=ON ..
- make -j2
- make -j2 coveralls CTEST_OUTPUT_ON_FAILURE=1
- popd