|
@@ -0,0 +1,51 @@
|
|
1
|
+---
|
|
2
|
+version: 2
|
|
3
|
+
|
|
4
|
+jobs:
|
|
5
|
+ build:
|
|
6
|
+ environment:
|
|
7
|
+ TERM: dumb
|
|
8
|
+ _JAVA_OPTIONS: "-Xmx3g"
|
|
9
|
+ GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
|
|
10
|
+ docker: # run the steps with Docker
|
|
11
|
+ - image: circleci/openjdk:8-jdk
|
|
12
|
+ steps:
|
|
13
|
+ - run: git clone https://github.com/DMDirc/Meta.git .
|
|
14
|
+ - run: git submodule update --init --remote
|
|
15
|
+ - run: |
|
|
16
|
+ cd plugins
|
|
17
|
+ git remote set-url origin https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git:
|
|
18
|
+ if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
|
19
|
+ git fetch origin pull/$CIRCLE_PR_NUMBER/head:circleci;
|
|
20
|
+ else
|
|
21
|
+ git fetch origin $CIRCLE_BRANCH:circleci;
|
|
22
|
+ fi
|
|
23
|
+ - run: cd plugins && git fetch --tags
|
|
24
|
+ - run: cd plugins && git checkout circleci
|
|
25
|
+ - run: ./gradlew dependencies
|
|
26
|
+ - run: ./gradlew --stacktrace plugins:jars plugins:tests plugins:coveralls
|
|
27
|
+ - save_cache:
|
|
28
|
+ paths:
|
|
29
|
+ - ~/.gradle/wrapper
|
|
30
|
+ key: v1-gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
|
|
31
|
+ - save_cache:
|
|
32
|
+ paths:
|
|
33
|
+ - ~/.gradle/caches
|
|
34
|
+ key: v1-gradle-cache-{{ checksum "build.gradle" }}
|
|
35
|
+ - run:
|
|
36
|
+ name: Prepare test output
|
|
37
|
+ command: |
|
|
38
|
+ mkdir -p ~/test-results/junit/
|
|
39
|
+ find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \;
|
|
40
|
+ - store_test_results:
|
|
41
|
+ path: ~/test-results
|
|
42
|
+ - store_artifacts:
|
|
43
|
+ path: ~/test-results/junit
|
|
44
|
+ - store_artifacts:
|
|
45
|
+ path: plugins/dist
|
|
46
|
+
|
|
47
|
+workflows:
|
|
48
|
+ version: 2
|
|
49
|
+ workflow:
|
|
50
|
+ jobs:
|
|
51
|
+ - build
|