-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.travis.yml
149 lines (131 loc) · 3.62 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#
# Copyright (c) 2019 Carnegie Mellon University,
# Copyright (c) 2019 Triad National Security, LLC, as operator of
# Los Alamos National Laboratory.
#
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. See the AUTHORS file for names of contributors.
#
#
# .travis.yml travis ci config for pdlfs-common
# 07-Oct-2016 [email protected]
#
# disable sudo, causes us to build in a container environment
sudo: false
# set OS dist we want, rather than taking the default
dist: trusty
# setup for a c/c++ based project
language: cpp
# additional packages. gmp/mpfr/mpc are for building gcc.
addons:
apt:
packages:
- automake
- libboost-dev
- libgmp-dev
- libmpfr-dev
- libmpc-dev
# cache directory persists between runs (prebuild stuff here, like gcc, cmake, mpich)
cache:
directories:
- $HOME/cache
# define build matrix using os/compiler/env
os:
- linux
- osx
compiler:
- clang
- gcc
env:
global:
- PKG=deltafs
- XCMAKE=${HOME}/cache/bin/cmake
matrix:
- BUILD=Release SANI=Off
- BUILD=Debug SANI=Off
- BUILD=Debug SANI=Address
# the default matrix is (os) x (compiler) x (env-matrix), but we can exclude
# rows here if we want to
# e.g.
matrix:
exclude:
- os: osx
env: BUILD=Debug SANI=Address
- os: linux
env: BUILD=Debug SANI=Address
compiler: clang
#
# git related config (restrict to master and zap submodules)
branches:
only:
- master
git:
submodules: false
#
# note: before_install, install, before_script, script all get combined
# into one shell script that runs on the travis node. e.g. changing
# an environment variable in before_install will impact the install
# and everything else that comes after it.
#
# before_install: add all depends, including the ones that go in the cache
before_install:
- echo "Before install"
- echo "Home directory is ${HOME}"
- echo "Contents of ${HOME}"
- ls -a ${HOME}
- export PATH=${HOME}/cache/bin:${PATH}
- >
if [ x${TRAVIS_OS_NAME} = xlinux -a x${CC} = xgcc ]; then
echo "Adding extra envs for custom gcc environment"
export PATH=${HOME}/cache/gcc/bin:${PATH}
gcclib=${HOME}/cache/gcc
export LD_LIBRARY_PATH=${gcclib}/lib:${gcclib}/lib64:${LD_LIBRARY_PATH}
fi
- echo "Environment"
- printenv
- export CACHE_INITSRC=ftp://ftp:[email protected]/pub/pdlfs
- ./external/pdlfs-common/cmake/travis-checkcache.sh
- echo contents of cache
- ls ${HOME}/cache
- ls ${HOME}/cache/bin
- ls ${HOME}/cache/lib*
- echo cmake version after cache
- ${XCMAKE} --version
- echo compiler version after cache
- which ${CC}
- ${CC} --version
# install: build our code and do a test install
install:
- echo "Install"
- echo "PATH is ${PATH}"
- ${XCMAKE} --version
- ${CC} --version
- mkdir -p build
- cd build
- >
${XCMAKE} -DCMAKE_INSTALL_PREFIX=/tmp/${PKG} \
-DCMAKE_BUILD_TYPE=${BUILD} \
-DCMAKE_PREFIX_PATH=${HOME}/cache \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=ON \
-DPDLFS_GFLAGS=ON \
-DPDLFS_GLOG=ON \
-DPDLFS_MARGO_RPC=OFF \
-DPDLFS_MERCURY_RPC=ON \
-DPDLFS_RADOS=OFF \
-DPDLFS_SNAPPY=ON \
-DDELTAFS_COMMON_INTREE=ON \
..
- make && make install
- echo "Installed into /tmp/${PKG}"
- ls /tmp/${PKG}/lib
# before_script: anything to do before starting test
before_script:
- echo "Before Script"
- echo "PATH is ${PATH}"
- pwd
# script: run the test itself
script:
- ctest -VV --output-on-failure