-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 1.75 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
dist: trusty
sudo: required
language: cpp
compiler: g++
addons:
sonarcloud:
organization: "gautierbureau-github"
token:
secure: ${SONAR_TOKEN}
install:
# We checkout the right commit to test (either a push or a merge test during a pull request)
# We could also either checkout TRAVIS_BRANCH for the push
# or use git fetch origin +refs/pull/PR_NUMBER/merge and git checkout FETCH_HEAD for the merge test of a pull request
- sudo apt-get install gcovr realpath lcov
- gem install coveralls-lcov
- CHECKOUT_COMMIT=$(git rev-parse HEAD)
- echo $CHECKOUT_COMMIT
- echo TRAVIS_PULL_REQUEST $TRAVIS_PULL_REQUEST
- echo TRAVIS_PULL_REQUEST_BRANCH $TRAVIS_PULL_REQUEST_BRANCH
- echo TRAVIS_BRANCH $TRAVIS_BRANCH
- echo TRAVIS_EVENT_TYPE $TRAVIS_EVENT_TYPE
- echo TRAVIS $TRAVIS
- echo CI $CI
- BRANCH=$(git rev-parse --abbrev-ref HEAD)
- echo $(git rev-parse --abbrev-ref HEAD)
- git_command=$(./checkout_commit.sh)
- echo $git_command
- (cd /tmp;wget https://github.com/google/googletest/archive/release-1.8.1.tar.gz;tar -xzf release-1.8.1.tar.gz;cd googletest-release-1.8.1;mkdir build;cd build;cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON ..;make;sudo make install)
script:
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
- ./compile.sh build-tests
- ls coverage
# - cat coverage/report.xml
- build-wrapper-linux-x86-64 --out-dir bw-output ./build_sonar.sh
- sonar-scanner
- coveralls-lcov -t $COVERALLS_TOKEN coverage.info
# after_success:
# - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_EVENT_TYPE" = "push" ]; then curl -v --header "Content-Type":" application/json" -X POST --data '{"dynawo":"Update"}' https://cloud.docker.com/api/build/v1/source/$DOCKER_HUB_TOKEN1/trigger/$DOCKER_HUB_TOKEN2/call/; fi