forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
266 lines (236 loc) · 7.32 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
language: java
sudo: false
cache:
apt: true
directories:
- ~/.m2
addons:
apt:
packages:
- xsltproc
- xmlstarlet
- oracle-java8-installer
branches:
only:
- master
install:
-
matrix:
fast_finish: true
include:
# testing of PR format
- env:
- DESC="test Issue ref in PR description"
- CMD="./.ci/travis/travis.sh pr-description"
- SKIP_CI="false"
# unit tests (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests and deploy"
- CMD="mvn -e clean integration-test failsafe:verify -DargLine='-Xms1024m -Xmx2048m'"
- DEPLOY="true"
# checkstyle (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="checkstyle and sevntu-checkstyle"
- CMD="./.ci/travis/travis.sh checkstyle-and-sevntu"
# jacoco and codecov (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="jacoco and codecov"
- CMD="./.ci/travis/travis.sh jacoco"
- CMD_AFTER_SUCCESS="bash <(curl -s https://codecov.io/bash)"
# spotbugs and pmd (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="spotbugs,pmd"
- CMD="export MAVEN_OPTS='-Xmx2000m' && mvn -e clean compile pmd:check spotbugs:check"
# eclipse static analysis
- jdk: oraclejdk8
env:
- DESC="eclipse static analysis"
- CMD="mvn -e clean compile exec:exec -Peclipse-compiler"
# Releasenotes generation - validation
- 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
- jdk: oraclejdk8
env:
- DESC="site without validations"
- CMD="./.ci/travis/travis.sh site"
# unit tests in German locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests de"
- CMD="./.ci/travis/travis.sh test-de"
# unit tests in Spanish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests es"
- CMD="./.ci/travis/travis.sh test-es"
# unit tests in Finnish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests fi"
- CMD="./.ci/travis/travis.sh test-fi"
# unit tests in French locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests fr"
- CMD="./.ci/travis/travis.sh test-fr"
# unit tests in Chinese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests zh"
- CMD="./.ci/travis/travis.sh test-zh"
# unit tests in Japanese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests ja"
- CMD="./.ci/travis/travis.sh test-jp"
# unit tests in Portuguese locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests pt"
- CMD="./.ci/travis/travis.sh test-pt"
# unit tests in Turkish locale (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="tests tr"
- CMD="./.ci/travis/travis.sh test-tr"
# 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"
- SKIP_CI="false"
# 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
osx_image: xcode9.3
env:
- DESC="MacOS verify, site, assembly
- CMD1="mvn -e package -Dlinkcheck.skip=true"
- CMD2="mvn -e package -Passembly"
- CMD="export JAVA_HOME=$(/usr/libexec/java_home) && $CMD1 && $CMD2"
# https://sonarcloud.io (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="sonarcloud.io"
- 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"
# versions to update
- jdk: oraclejdk8
env:
- DESC="print versions to update"
- CMD="./.ci/travis/travis.sh versions"
- SKIP_CI="false"
# OpenJDK8 build
- jdk: openjdk8
env:
- DESC="build with OpenJDK8"
- CMD="mvn -e package -Passembly && mvn -e site -Dlinkcheck.skip=true"
# OracleJDK9 build
- jdk: oraclejdk9
env:
- DESC="build with OracleJDK9"
- CMD="mvn -e package -Passembly && mvn -e site -Dlinkcheck.skip=true"
# OracleJDK9 compile input files with jdk9 specific syntax
- jdk: oraclejdk9
env:
- DESC="compile input files with jdk9 specific syntax"
- CMD="./.ci/travis/travis.sh javac9"
# compile input files compilation that are not compiled by eclipse
- jdk: oraclejdk8
env:
- DESC="compile input files that are not compiled by eclipse"
- CMD="./.ci/travis/travis.sh javac8"
# new questionably spelled words
- env:
- DESC="spell checker"
- CMD="./.ci/test-spelling-unknown-words.sh"
- SKIP_CI="false"
script:
- SKIP_FILES1=".github|codeship-*|buddy.yml|appveyor.yml|circleci|distelli-manifest.yml"
- SKIP_FILES2="|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr"
- SKIP_FILES3="|shippable.yml|shippable.sh|wercker.yml|wercker.sh|intellij-idea-inspections.xml"
- SKIP_FILES4="|Jenkinsfile"
- SKIP_FILES=$SKIP_FILES1$SKIP_FILES2$SKIP_FILES3$SKIP_FILES4
- |
if [[ $SKIP_CI != 'false' ]]; then
if [[ $(git diff --name-only HEAD HEAD~1 | grep -vE "$SKIP_FILES" \
| cat | wc -c | sed 's/^ *//' ) > 0 ]]; then
SKIP_CI="false"
else
SKIP_CI="true"
fi
fi
- echo "SKIP_CI="$SKIP_CI
- |
set -e
if [[ $SKIP_CI == 'false' ]];
then
eval $CMD;
echo "eval of CMD is completed"
else
echo "CI is skipped"
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=false
if [ $(git log -1 | grep -E "\[maven-release-plugin\] prepare release" | cat | wc -l) -lt 1 ];
then
SKIP_DEPLOY=false;
else
SKIP_DEPLOY=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 -e -s config/deploy-settings.xml -Pno-validations deploy;
echo "deploy to maven snapshot repository is finished";
fi