forked from SonarOpenCommunity/sonar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (60 loc) · 2.14 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
language: java
os: linux
dist: xenial
jdk:
- openjdk11
env:
- SONARLABEL=sonarqube-7.9.6 SONARAPI=SqApi79
- SONARLABEL=sonarqube-8.9.2.46101 SONARAPI=SqApi79
addons:
# shorten the VM hostname with the new workaround
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
hosts:
- myshorthost
hostname: myshorthost
apt:
packages:
# needed for 'xmllint'
- libxml2-utils
before_cache:
# remove all the artifacts that are installed in local repo because of mvn deploy
- rm -rf $HOME/.m2/repository/org/sonarsource/sonarqube-plugins/cxx
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
cache:
pip: true
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar'
- '$HOME/jvm'
- '$HOME/maven'
install:
- export SONARHOME="/tmp/$SONARLABEL"
- pushd /tmp
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonarqube/$SONARLABEL.zip
- unzip -qq $SONARLABEL.zip
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472.zip
- unzip -qq sonar-scanner-cli-4.6.2.2472.zip
- wget -nv --timeout=10 https://github.com/htacg/tidy-html5/archive/5.6.0.zip --output-document=tidy-html5.zip
- unzip -qq tidy-html5.zip
- pushd tidy-html5-5.6.0/build/cmake/
- cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/tidy-html5-5.6.0 && make && make install && PATH=$PATH:/tmp/tidy-html5-5.6.0/bin
- popd
- popd
before_script:
- travis_retry sudo pip install -q requests
- travis_retry sudo pip install -q behave
- travis_retry sudo pip install -q colorama
script:
- env
- mvn install -B -e -V -DskipTests=true
- mvn test -B -e -V
- bash cxx-sensors/src/tools/check_rules.sh
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-4.6.2.2472/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture --tags=$SONARAPI
after_success:
- find . -name "*.log" | xargs cat
after_failure:
- cat $SONARHOME/logs/sonar-*.log
- cat $SONARHOME/logs/web.log
- cat $SONARHOME/logs/ce.log
- cat $SONARHOME/logs/es.log
- find . -name "*.log" | xargs cat