forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
52 lines (51 loc) · 3.24 KB
/
circle.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
checkout:
post:
- git clone https://github.com/checkstyle/contribution
dependencies:
cache_directories:
- groovy-2.4.7
pre:
- if [ ! -d groovy-2.4.7 ]; then wget https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.7.zip && unzip apache-groovy-binary-2.4.7.zip; fi
# we to override as 'mvn dependecy:go-ofline' does not download all dependencies
override:
- mvn install -Pno-validations
- eval $TESTER_DEPENDENCIES
machine:
java:
version: oraclejdk8
environment:
CMD1: "cd contribution/checkstyle-tester"
DEP1: " && sed -i'' 's/^guava/#guava/' projects-to-test-on.properties"
# we need this to let pass 'mvn site' on no-projects mode to download all dependecies
DEP2: " && echo 'class ClassEmpty{}' > src/main/java/EmptyClass.java"
DEP3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-to-test-on.properties --config my_check.xml"
TESTER_DEPENDENCIES: $CMD1$DEP1$DEP2$DEP3
CMD2: " && sed -i'' 's/^openjdk/#openjdk/' projects-for-circle.properties"
CMD3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-for-circle.properties --config checks-nonjavadoc-error.xml"
OPENJDK7: " && sed -i'' 's/#openjdk7/openjdk7/' projects-for-circle.properties"
OPENJDK8: " && sed -i'' 's/#openjdk8/openjdk8/' projects-for-circle.properties"
OPENJDK9: " && sed -i'' 's/#openjdk9/openjdk9/' projects-for-circle.properties"
INFINISPAN: " && sed -i'' 's/#infinispan/infinispan/' projects-for-circle.properties"
PROTONPACK: " && sed -i'' 's/#protonpack/protonpack/' projects-for-circle.properties"
JOOL: " && sed -i'' 's/#jOOL/jOOL/' projects-for-circle.properties"
TAPESTRY: " && sed -i'' 's/#tapestry-5/tapestry-5/' projects-for-circle.properties"
COMMONS: " && sed -i'' 's/#apache-commons/apache-commons/' projects-for-circle.properties"
LUCENE: " && sed -i'' 's/#lucene-solr/lucene-solr/' projects-for-circle.properties"
STORM: " && sed -i'' 's/#storm/storm/' projects-for-circle.properties"
HADOOP: " && sed -i'' 's/#hadoop/hadoop/' projects-for-circle.properties"
CASSANDRA: " && sed -i'' 's/#cassandra/cassandra/' projects-for-circle.properties"
SCOUTER: " && sed -i'' 's/#scouter/scouter/' projects-for-circle.properties"
GROOVY: " && sed -i'' 's/#groovy/groovy/' projects-for-circle.properties"
# Test over openjdk7,8
TEST_1: $CMD1$CMD2$OPENJDK7$OPENJDK8$CMD3
# Test over infinispan, protonpack, jOOL, lucene-solr, openjdk9
TEST_2: $CMD1$CMD2$INFINISPAN$PROTONPACK$JOOL$LUCENE$OPENJDK9$CMD3
# Test over tapestry5, storm, cassandra
TEST_3: $CMD1$CMD2$TAPESTRY$STORM$CASSANDRA$CMD3
# Test over apache-commons, hadoop, scouter, groovy
TEST_4: $CMD1$CMD2$COMMONS$HADOOP$SCOUTER$GROOVY$CMD3
SKIP_FILES: ".github|appveyor.yml|.travis.yml|.ci|distelli-manifest.yml|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr|shippable.yml|wercker.yml|intellij-idea-inspections.xml|org.eclipse.jdt.core.prefs"
test:
override:
- if [ $(git diff --name-only HEAD HEAD~1 | grep -vE $SKIP_FILES | wc -c) -gt 0 ] ; then case $CIRCLE_NODE_INDEX in 0) eval $TEST_1 ;; 1) eval $TEST_2 ;; 2) eval $TEST_3 ;; 3) eval $TEST_4 ;; esac; fi:
parallel: true