This repository has been archived by the owner on Feb 1, 2019. It is now read-only.
forked from SonarOpenCommunity/sonar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (76 loc) · 3.66 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
language: java
dist: trusty
sudo: required
jdk:
- oraclejdk8
env:
- SONARHOME=/tmp/sonarqube-6.7.6 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.0 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.1 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.2 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.3 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.4 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.5 SONARAPI=SqApi75
matrix:
fast_finish: true
# allow_failures:
# - env: SONARHOME=/tmp/sonarqube-7.0-RC1 SONARAPI=SqApi67
# shorten the VM hostname with the new workaround
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
addons:
hosts:
- myshorthost
hostname: myshorthost
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'
before_install:
- cat /etc/hosts # optionally check the content
# Boost 1.55 is pre-installed on Ubuntu Trusty
#- travis_retry sudo apt-add-repository -y ppa:boost-latest/ppa
#- travis_retry sudo apt-get -qq update
#- travis_retry sudo apt-get -qq install boost1.55
- travis_retry sudo apt-get -qq install libxml2-utils
install:
- pushd /tmp
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-6.7.6.zip
- unzip -qq sonarqube-6.7.6.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.0.zip
- unzip -qq sonarqube-7.0.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.1.zip
- unzip -qq sonarqube-7.1.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.2.zip
- unzip -qq sonarqube-7.2.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.3.zip
- unzip -qq sonarqube-7.3.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.4.zip
- unzip -qq sonarqube-7.4.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.5.zip
- unzip -qq sonarqube-7.5.zip
- travis_retry wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227.zip
- unzip -qq sonar-scanner-cli-3.2.0.1227.zip
- travis_retry wget -q 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-3.2.0.1227/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture --tags=$SONARAPI
after_failure:
- cat $SONARHOME/logs/sonar.log
- find . -name "*.log" | xargs cat