]> source.dussan.org Git - gitblit.git/commitdiff
Setup build matrix for OpenJDK 8, 9 and 11 on Circle CI
authorFlorian Zschocke <florian.zschocke@devolo.de>
Wed, 6 Nov 2019 15:20:27 +0000 (16:20 +0100)
committerFlorian Zschocke <florian.zschocke@devolo.de>
Wed, 6 Nov 2019 15:47:44 +0000 (16:47 +0100)
.circleci/config.yml

index 605be7040d0fc1a21eb8bc488515983b0881a2f2..2da8c68a1f08f38422c196570cbc308b9873df94 100644 (file)
@@ -1,28 +1,51 @@
+gbsteps: &gbsteps
+  steps:
+    - run:
+        name: Report on build environment
+        command: |
+          java -version
+          javac -version
+
+    - checkout
+    - run: ant
+
+    - run: ant test
+    - run:
+        name: Collect test results
+        command: |
+          mkdir -p test_reports/junit/
+          cp -a build/tests/TEST-*.xml test_reports/junit/
+    - store_test_results:
+        path: test_reports
+    - store_artifacts:
+        path:  build/target/reports
+
+
 version: 2
 
 jobs:
-  build:
+  buildJ8:
     docker:
       - image: circleci/openjdk:8-jdk
 
-    steps:
-      - run:
-          name: Report on build environment
-          command: |
-            java -version
-            javac -version
-
-      - checkout
-      - run: ant
-
-      - run: ant test
-      - run:
-          name: Collect test results
-          command: |
-            mkdir -p test_reports/junit/
-            cp -a build/tests/TEST-*.xml test_reports/junit/
-      - store_test_results:
-          path: test_reports
-      - store_artifacts:
-          path:  build/target/reports
+    <<: *gbsteps
+
+  buildJ9:
+    docker:
+      - image: circleci/openjdk:9-jdk
+
+    <<: *gbsteps
+
+  buildJ11:
+    docker:
+      - image: circleci/openjdk:11-jdk
+
+    <<: *gbsteps
 
+workflows:
+  version: 2
+  build:
+    jobs:
+      - "buildJ8"
+      - "buildJ9"
+      - "buildJ11"