-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
50 lines (43 loc) · 1.47 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
language: cpp
dist: focal
compiler:
- clang
addons:
apt:
packages:
- cppcheck
sonarcloud:
organization: "andrej-sajenko-github"
token:
secure: $SONAR_TOKEN
#cache:
# directories:
# - ./third-party
before_install:
- git fetch --unshallow
- pip install --user cpplint cpp-coveralls
- 'if test $CC = clang; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi'
script:
- cpplint --quiet src/*.* src/*/*.*
- cpplint --quiet include/sealib/*.* include/sealib/*/*.*
- cpplint --quiet src-view/*.*
- cpplint --quiet test/*.*
- cppcheck --enable=performance,portability --error-exitcode=1 --quiet -Iinclude src/ src-view/
- cmake -DCOVERAGE=1 .
- 'if test $TRAVIS_PULL_REQUEST = false || test "$TRAVIS_PULL_REQUEST_SLUG" = thm-mni-ii/sea; then build-wrapper-linux-x86-64 --out-dir bw-output make -j$(nproc); else make -j$(nproc); fi'
- ./bin/tests
after_success:
- (cd CMakeFiles/tests.dir && for d in $(find src -type d); do gcov $d/*.gcno >/dev/null; done); cp CMakeFiles/tests.dir/*.gcov .
- coveralls --no-gcov --root . -e src-view -e test -e include -e third-party -e CMakeFiles
- 'if test $TRAVIS_PULL_REQUEST = false || test "$TRAVIS_PULL_REQUEST_SLUG" = thm-mni-ii/sea; then sonar-scanner; fi'
before_deploy:
# tar the header files and the library
- tar -czf sealib.tar.gz ./include ./lib
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: "sealib.tar.gz"
skip_cleanup: true
on:
tags: true
branch: master