-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
95 lines (84 loc) · 2.24 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
sudo: false
language: cpp
git:
submodules: true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- doxygen
matrix:
include:
# ubuntu 14.04, gcc-5
- env: VER=5 COV=YES
compiler: gcc
os: linux
dist: trusty
addons: { apt: { packages: ["g++-5", "doxygen"], sources: ["ubuntu-toolchain-r-test"] } }
# ubuntu 14.04, gcc-6
- env: VER=6
compiler: gcc
os: linux
dist: trusty
addons: { apt: { packages: ["g++-6", "doxygen"], sources: ["ubuntu-toolchain-r-test"] } }
# ubuntu 14.04, gcc-7
- env: VER=7
compiler: gcc
os: linux
dist: trusty
addons: { apt: { packages: ["g++-7", "doxygen"], sources: ["ubuntu-toolchain-r-test"] } }
install:
# set the correct `CC` and `CXX` environment variables.
- |
if [ -n "${VER}" ]; then
export CC="${CC}-${VER}"
export CXX="${CXX}-${VER}"
fi
- ${CXX} --version
# directory for dependency installation.
- DEPS="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS}
# install newer cmake.
- |
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update
brew upgrade cmake
elif [ "${TRAVIS_OS_NAME}" = "linux" ]; then
travis_retry wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
bash cmake-3.8.2-Linux-x86_64.sh --skip-license --prefix="${DEPS}"
export PATH="${DEPS}/bin:${PATH}"
fi
script:
- git rev-parse HEAD
- BUILDS=(Debug Release)
- mkdir build
- pushd build
- |
for BUILD in "${BUILDS[@]}"; do
(
set -x
cmake -DCMAKE_BUILD_TYPE="${BUILD}" \
-DCMAKE_INSTALL_PREFIX:PATH=install \
-DRUSTFP_INCLUDE_UNIT_TESTS=ON \
-DRUSTFP_INCLUDE_TEST_COVERAGE=ON ..
)
cmake --build . --target install -- -j 2
ctest -R rustfp_unit_test -V
ec=$?
if [ "${COV}" = "YES" ] && [ "${BUILD}" = "Debug" ]; then
gcov ./CMakeFiles/rustfp_unit_test.dir/src/rustfp_unit_test/unit_test.cpp.gcno
ec=$?
bash <(curl -s https://codecov.io/bash)
fi
(exit $ec)
done
- popd
after_success:
# generate document
- doxygen Doxyfile
branches:
only:
- master