-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (40 loc) · 1.57 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
dist: bionic
sudo: true
language: cpp
os: linux
addons:
sonarcloud:
organization: "jmramosr-github"
apt:
packages:
# - g++
# - gcc
# - make
# - lcov
# - gcovr
# - doxygen
- cmake
- gcovr
before_install:
- pip install codecov
# - pip install gcovr
#cache:
# apt: true
# directories:
# - "${TRAVIS_BUILD_DIR}/deps/doxygen"
# - '$HOME/.sonar/cache'
before_script:
# Google test library creation script
# you can use similar behaviour to compile another libraries and move them if you want.
# Mayor constraint: there is no cmake -S ./lib/gtest -B ./cmake-gtest-build in this version of cmake. That means we cannot specify the path-to-build directly.
# ctest exist in the travis version, we can use this in a hacky way:
# cmake -S ./lib/gtest -B ./cmake-gtest-build => ctest --build-and-test ./lib/gtest ./cmake-gtest-build --build-generator "Unix Makefiles"
- ctest -Dgtest_build_samples=OFF -Dgtest_build_tests=OFF -Dgmock_build_tests=OFF -Dcxx_no_exception=ON -Dcxx_no_rtti=ON -DCMAKE_COMPILER_IS_GNUCXX=ON --build-and-test ./lib/gtest ./cmake-gtest-build --build-generator "Unix Makefiles"
# Checker if everything goes well (there will be a new folder called "cmake-gtest-build". You can check the inners of the folder, too.
- ls -la ${TRAVIS_BUILD_DIR}
script:
- build-wrapper-linux-x86-64 --out-dir bw-output ctest --build-and-test . ./build --build-generator "Unix Makefiles"
- bash generate_gcov.sh
- sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output
after_success:
- codecov -t $CODECOV_TOKEN -X gcov