-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy path.travis.yml
176 lines (159 loc) · 5.49 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Build matrix / environment variables are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on:
# http://lint.travis-ci.org/
# See also
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
# to allow C++11, though we are not yet building with -std=c++11
language: cpp
sudo: false
os:
- linux
# - osx
compiler:
# - clang
- gcc
# environment variables
env:
global:
- PROJ_SOURCE_DIR=${TRAVIS_BUILD_DIR}
- PROJ_BUILD_DIR=${HOME}/BT-11
- PROJ_INSTALL_DIR=${HOME}/install
- BUILD_TYPE=Release
# https://docs.travis-ci.com/user/customizing-the-build/
git:
depth: false # Need the full depth of the repo for version history
# http://www.brianlheim.com/2017/08/20/supercollider-travisci.html
# use ccache to speed up build times. on osx,
# we install it during the the before_install step
# with xcode, this requires an additional flag passed during the configuration phase.
# see README_MACOS.md for details.
#cache:
# - ccache
# cache the build dir
cache:
timeout: 1000
directories:
- ${PROJ_BUILD_DIR}
#use containers <-- todo investigate
# general dependencies
addons:
apt:
#sources:
#- llvm-toolchain-precise-3.5
packages:
- ninja-build
#- gcc-4.9
#- g++-4.9
#- clang-3.5
#- valgrind
homebrew:
packages:
- ninja
# - cmake
# update: false # do not update homebrew by default
#
#before_install:
# # Install a supported cmake version (>= 3.4.3)
# - wget -O cmake.sh https://cmake.org/files/v3.16/cmake-3.16.4-Linux-x86_64.sh
# - sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local
# additional setup
install:
# additional dependencies in ${HOME}/deps/
- DEPS_DIR="${HOME}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
# install recent cmake
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.16/cmake-3.16.2-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew install cmake || brew upgrade cmake
fi
- cmake --version && ctest --version
# before script runs, we need to resolve timestamps between the git clone
# and the older build cache. A good discussion is found here:
# https://blog.esciencecenter.nl/travis-caching-and-incremental-builds-6518b89ee889
before_script:
# create build & install directories if they do not exist
- mkdir -p ${PROJ_BUILD_DIR} ${PROJ_INSTALL_DIR}
# fix times on source
- |
MD5_FILE=${PROJ_BUILD_DIR}/build_cache.md5
export OLDEST_DATE=$(find ${PROJ_BUILD_DIR} -type f -printf '%TD %TT\n' | sort | head -1)
if [ -f ${MD5_FILE} ]; then
(md5sum -c ${MD5_FILE} 2>/dev/null || :) | awk '{if ($NF == "OK") print substr($0, 1, length($0)-4)}' | xargs touch -d "${OLDEST_DATE}"
fi
find ${PROJ_SOURCE_DIR} \( -type d -name .git \) -prune -o -type f -print0 | xargs -0 md5sum > ${MD5_FILE}
- echo "SOURCES:"
- ls -alhrtd ${PROJ_SOURCE_DIR}/*
- echo "BUILD:"
- ls -alhrtd ${PROJ_BUILD_DIR}/*
- head ${MD5_FILE}
matrix:
# allow_failures:
# - os: osx
include:
# - name: Mac clang static release testing
# os: osx
# osx_image: xcode9.4
# compiler: clang
# script: ./.travis_build_script.sh
# - name: xenial clang static release testing
# os: linux
# dist: xenial
# compiler: clang
# script: ./.travis_build_script.sh
- name: xenial gcc cmake coverage
os: linux
dist: xenial
compiler: gcc
script:
- printenv
- mkdir -p ${PROJ_BUILD_DIR}
- cd ${PROJ_BUILD_DIR}
- cmake
-G Ninja
-DEXTERNAL_PROJECT_BUILD_TYPE:STRING=${BUILD_TYPE}
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}
-DCMAKE_CXX_STANDARD:STRING=11
-DUSE_ANTS:BOOL=OFF
-DBRAINSTools_REQUIRES_VTK:BOOL=OFF
-DUSE_BRAINSABC:BOOL=OFF
-DUSE_BRAINSDWICleanup:BOOL=OFF
-DUSE_BRAINSInitializedControlPoints:BOOL=OFF
-DUSE_BRAINSLabelStats:BOOL=OFF
-DUSE_BRAINSLandmarkInitializer:BOOL=OFF
-DUSE_BRAINSROIAuto:BOOL=OFF
-DUSE_BRAINSResample:BOOL=OFF
-DUSE_BRAINSSnapShotWriter:BOOL=OFF
-DUSE_BRAINSStripRotation:BOOL=OFF
-DUSE_BRAINSTransformConvert:BOOL=OFF
-DUSE_ConvertBetweenFileFormats:BOOL=OFF
-DUSE_ImageCalculator:BOOL=OFF
-DUSE_ReferenceAtlas:BOOL=OFF
${PROJ_SOURCE_DIR}
- cd ${PROJ_BUILD_DIR}
- ls -alrthd ${PROJ_BUILD_DIR}/*
- ninja
- cd ${PROJ_BUILD_DIR}/BRAINSTools-${BUILD_TYPE}-EP${BUILD_TYPE}-build
- ninja clean
- ls -alrthd ${PROJ_BUILD_DIR}/BRAINSTools-${BUILD_TYPE}-EP${BUILD_TYPE}-build/*
- ctest -D ExperimentalStart
- ctest -D ExperimentalConfigure
- ctest -D ExperimentalBuild -j2
# - travis_wait 20 ctest -D ExperimentalTest --schedule-random -j2 --output-on-failure
- echo "NO TESTS RUN"
- ctest -D ExperimentalSubmit
# - travis_wait 20 ninja test
# Valgrind has too many false positives from the python wrapping. Need a good suppression file
# - name: xenial gcc cmake coverage
# os: linux
# dist: xenial
# compiler: gcc
# script: ./.travis_build_script.sh
notifications:
email:
recipients: