forked from netket/netket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
99 lines (82 loc) · 2.23 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
#########################
# project configuration #
#########################
# C++ project
language: cpp
dist: trusty
sudo: required
################
# build matrix #
################
matrix:
include:
# clang sanitizer
- os: osx
osx_image: xcode9.4
compiler: clang
env:
- CMAKE_OPTIONS=-DNETKET_Sanitizer=ON
- os: osx
osx_image: xcode8.3
- os: osx
osx_image: xcode9.4
- os: linux
compiler: gcc
env:
- COMPILER=g++-5
- CMAKE_OPTIONS=-DUSE_LAPACK=ON
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5','mpich','libmpich-dev', 'libboost-all-dev',
'liblapack3','libblas-dev', 'liblapack-dev','liblapacke-dev']
- os: linux
compiler: gcc
env:
- COMPILER=g++-6
- CMAKE_OPTIONS=-DUSE_LAPACK=ON
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6','mpich','libmpich-dev', 'libboost-all-dev','liblapack3',
'libblas-dev', 'liblapack-dev','liblapacke-dev']
- os: linux
compiler: clang
env:
- COMPILER=clang++-5.0
- CXXFLAGS=-std=c++1z
- CMAKE_OPTIONS=-DUSE_LAPACK=ON
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0', 'mpich','libmpich-dev', 'libboost-all-dev',
'liblapack3','libblas-dev', 'liblapack-dev','liblapacke-dev']
cache:
apt: true
directories:
- $HOME/Library/Caches/Homebrew
################
# build script #
################
script:
# get CMake and Mpi (only for systems with brew - macOS)
- |
if [[ (-x $(which brew)) ]]; then
brew install cmake
brew install openmpi
brew install --without-python boost
brew install lapack
brew upgrade cmake
brew upgrade openmpi
cmake --version
fi
# make sure CXX is correctly set
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
# show OS/compiler version
- uname -a
- $CXX --version
# compile and execute unit tests
- mkdir -p build && cd build
- cmake .. ${CMAKE_OPTIONS} -DENABLE_TESTS=ON -DCMAKE_CXX_FLAGS_RELEASE=-O3 && cmake --build . --config Release
- ctest -C Release -V -j
- cd ..