forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
213 lines (189 loc) · 7.04 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
language: java
sudo: false
cache:
apt: true
directories:
- ~/.m2
addons:
apt:
packages:
- xsltproc
- xmlstarlet
- oracle-java8-installer
branches:
only:
- master
install:
- |
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
# https://github.com/travis-ci/travis-ci/issues/6307#issuecomment-233315824
rvm get head
fi
matrix:
fast_finish: true
include:
# testing of PR format
- env:
- DESC="test Issue ref in PR description"
- CMD="./.ci/travis/travis.sh pr-description"
# unit tests (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests and deploy"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Xms1024m -Xmx2048m'"
- DEPLOY="true"
# checkstyle (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="checkstyle and sevntu-checkstyle"
- CMD="export MAVEN_OPTS='-Xmx2000m' && mvn clean verify -DskipTests -DskipITs -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true"
# cobertura and codecov (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="cobertura and codecov"
- CMD="./.ci/travis/travis.sh cobertura-check"
- CMD_AFTER_SUCCESS="bash <(curl -s https://codecov.io/bash)"
# findbugs, spotbugs and pmd (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="findbugs,spotbugs,pmd"
- CMD="export MAVEN_OPTS='-Xmx2000m' && mvn clean compile pmd:check findbugs:check spotbugs:check"
# eclipse static analysis
- jdk: oraclejdk8
env:
- DESC="eclipse static analysis"
- CMD="mvn clean compile exec:exec -Peclipse-compiler"
# Releasenotes generation - validaton
- jdk: oraclejdk8
env:
- DESC="Releasenotes generation"
- CMD="./.ci/travis/travis.sh releasenotes-gen"
# NonDex (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="NonDex"
- CMD="./.ci/travis/travis.sh nondex"
# site (oraclejdk8 as 'site' success is required to be sure that on release time all will be ok, admins will use oracle8 version)
# moved to https://codeship.com/projects/124310/configure_tests
#- jdk: oraclejdk8
# env:
# - DESC="site"
# - CMD1="mvn clean site -Dlinkcheck.skip=true -DskipTests -DskipITs "
# - CMD2=" -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true "
# - CMD3=" -Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true"
# - CMD=$CMD1$CMD2$CMD3
# - COVERAGE_CMD=""
# unit tests in German locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests de"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=de -Duser.country=DE -Xms1024m -Xmx2048m'"
# unit tests in Spanish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests es"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=es -Duser.country=ES -Xms1024m -Xmx2048m'"
# unit tests in Finnish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests fi"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=fi -Duser.country=FI -Xms1024m -Xmx2048m'"
# unit tests in French locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests fr"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=fr -Duser.country=FR -Xms1024m -Xmx2048m'"
# unit tests in Chinese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests zh"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=zh -Duser.country=CN -Xms1024m -Xmx2048m'"
# unit tests in Japanese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests ja"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=ja -Duser.country=JP -Xms1024m -Xmx2048m'"
# unit tests in Portuguese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests pt"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=pt -Duser.country=PT -Xms1024m -Xmx2048m'"
# unit tests in Turkish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests tr"
- CMD="mvn clean integration-test failsafe:verify -DargLine='-Duser.language=tr -Duser.country=TR -Xms1024m -Xmx2048m'"
# assembly (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="assembly & run '-all' jar"
- CMD="./.ci/travis/travis.sh assembly-run-all-jar"
# NoExceptiontest - Guava with google_checks (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="NoExceptionTest - Guava with google_checks"
- CMD="./.ci/travis/travis.sh no-exception-test-guava-with-google-checks"
# release dry run (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="release dry run"
- CMD="./.ci/travis/travis.sh release-dry-run"
# Check the chmod on files.
- env:
- DESC="check permissions on all files"
- CMD="./.ci/travis/travis.sh check-chmod"
# Ensure that all Sevntu check are kused
- jdk: oraclejdk8
env:
- DESC="All sevntu checks should be used"
- CMD="./.ci/travis/travis.sh all-sevntu-checks"
# MacOS verify (till cache is not working, we can not do verify)
- os: osx
env:
- DESC="MacOS verify, site, assembly"
- CMD="export JAVA_HOME=$(/usr/libexec/java_home) && mvn package -Dlinkcheck.skip=true && mvn package -Passembly "
# https://sonarqube.com (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="sonarqube.com"
- CMD="./.ci/travis/travis.sh sonarqube"
# No error testing - simple-binary-encoding
- jdk: oraclejdk8
env:
- DESC="no error test on simple-binary-encoding"
- CMD="./.ci/travis/travis.sh no-error-test-sbe"
script:
- SKIP_FILES=".github|appveyor.yml|circle.yml|distelli-manifest.yml|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr|shippable.yml|wercker.yml|intellij-idea-inspections.xml"
- SKIP_CI=$(if [[ $(git diff --name-only HEAD HEAD~1 | grep -vE "$SKIP_FILES" | cat | wc -c | sed 's/^ *//' ) > 0 ]]; then echo false; else echo true; fi;)
- echo "SKIP_CI="$SKIP_CI
- |
set -e
if [[ $SKIP_CI == 'false' ]];
then
eval $CMD;
echo "eval of CMD is completed"
fi
after_success:
- |
set -e
if [[ -n $CMD_AFTER_SUCCESS
&& $SKIP_CI == 'false'
]];
then
eval $CMD_AFTER_SUCCESS;
echo "CMD_AFTER_SUCCESS is finished";
fi
- |
set -e
SKIP_DEPLOY=$(if [ $(git log -1 | grep -E "\[maven-release-plugin\] prepare release" | cat | wc -l) -lt 1 ]; then echo false; else echo true; fi;)
if [[ $TRAVIS_REPO_SLUG == 'checkstyle/checkstyle'
&& $TRAVIS_BRANCH == 'master'
&& $TRAVIS_PULL_REQUEST == 'false'
&& $DEPLOY == 'true'
&& $SKIP_CI == 'false'
&& $SKIP_DEPLOY == 'false'
]];
then
mvn -s config/deploy-settings.xml -Pno-validations deploy;
echo "deploy to maven snapshot repository is finished";
fi