forked from chemfiles/chemfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
140 lines (133 loc) · 3.43 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
language: cpp
dist: trusty
branches:
only:
- master
- /^release-.*$/
# Also build tags
- /^\d+\.\d+(\.\d+)?(-\S*)?$/.
linux64_addons:
addons: &linux64
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
packages:
- g++-4.8
- valgrind
# Used for CHFL_EXTERNAL_NETCDF
- libnetcdf-dev
- python3.6
linux32_addons:
addons: &linux32
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- g++-4.8-multilib
- linux-libc-dev:i386
- libc6-dev-i386
matrix:
fast_finish: true
include:
- name: emscripten
os: linux
env: STATIC_LIBS=ON EMSCRIPTEN=ON
- name: static + doc + coverage
os: linux
compiler: gcc
env: STATIC_LIBS=ON DO_COVERAGE=ON DEPLOY_DOCS=ON
addons: *linux64
- name: clang + system libs
os: linux
compiler: clang
env: CMAKE_EXTRA="-DCHFL_SYSTEM_NETCDF=ON -DCHFL_SYSTEM_ZLIB=ON -DCHFL_SYSTEM_LZMA=ON"
addons: *linux64
- name: valgrind
os: linux
compiler: gcc
env: VALGRIND=ON CHECK_EXPORTS=ON
addons: *linux64
- name: 32-bits
os: linux
compiler: gcc
env: ARCH=x86 CMAKE_EXTRA=-DHAVE_LIBM=/lib32/libm.so.6
addons: *linux32
- name: osx clang
os: osx
compiler: clang
osx_image: xcode8.3
- name: osx gcc
os: osx
compiler: gcc
osx_image: xcode8.3
addons:
homebrew:
packages:
- gcc@5
update: true
- name: MSVC 64-bit
os: windows
env: CMAKE_GENERATOR="Visual Studio 14 2015 Win64"
filter_secrets: false
- name: MSVC 64-bit static
os: windows
env: CMAKE_GENERATOR="Visual Studio 14 2015 Win64" STATIC_LIBS=ON
filter_secrets: false
- name: MSVC 32-bit
os: windows
env: CMAKE_GENERATOR="Visual Studio 14 2015"
filter_secrets: false
- name: MinGW
os: windows
env: CMAKE_GENERATOR="MinGW Makefiles"
before_install:
# Setting environement
- cd $TRAVIS_BUILD_DIR
- source scripts/ci/setup-travis.sh
- $CC --version
- $CXX --version
script:
- cd $TRAVIS_BUILD_DIR
- mkdir build && cd build
- echo $CMAKE_CONFIGURE cmake -G "${CMAKE_GENERATOR}" $CMAKE_ARGS
- $CMAKE_CONFIGURE cmake -G "${CMAKE_GENERATOR}" $CMAKE_ARGS ..
- echo cmake --build . --config $CMAKE_BUILD_TYPE -- $BUILD_ARGS
- eval cmake --build . --config $CMAKE_BUILD_TYPE -- $BUILD_ARGS
- ctest -j2 --output-on-failure -C $CMAKE_BUILD_TYPE
- cd $TRAVIS_BUILD_DIR
# Check exported symbols in shared library
- |
if [[ "${CHECK_EXPORTS}" == "ON" ]]; then
./scripts/ci/check-exported-symbols.py build/libchemfiles.so
fi
# Build docs
- |
if [[ "${DEPLOY_DOCS}" == "ON" ]]; then
./scripts/ci/build-docs.sh
fi
# Generate and upload coverage
- |
if [[ "${DO_COVERAGE}" == "ON" ]]; then
cd $TRAVIS_BUILD_DIR
find . -type f -name '*.gcno' -exec gcov-4.8 -pb {} +
rm -f \#usr\#*.gcov
rm -f *\#external\#*.gcov
codecov -X gcov
fi
deploy:
- provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: build/gh-pages
on:
branch: master
condition: $DEPLOY_DOCS == ON
- provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: build/gh-pages
on:
tags: true
condition: $DEPLOY_DOCS == ON