Skip to content

Commit

Permalink
Excavator: Use Java 11 for building libraries (#66)
Browse files Browse the repository at this point in the history
Co-authored-by: svc-excavator-bot <[email protected]>
  • Loading branch information
svc-excavator-bot and svc-excavator-bot authored Nov 30, 2020
1 parent 38e688c commit ea51d04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 65 deletions.
70 changes: 6 additions & 64 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version: 2.1
jobs:
compile:
docker: [{ image: 'circleci/openjdk:8u222-stretch-node' }]
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: large
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
paths: [ project, .gradle/init.gradle ]

check:
docker: [{ image: 'circleci/openjdk:8u222-stretch-node' }]
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: medium
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
Expand All @@ -76,7 +76,7 @@ jobs:
- store_artifacts: { path: ~/artifacts }

unit-test:
docker: [{ image: 'circleci/openjdk:8u222-stretch-node' }]
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: large
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
Expand All @@ -97,60 +97,8 @@ jobs:
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }

unit-test-11:
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: large
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
GRADLE_OPTS: -Dorg.gradle.jvmargs='-XX:MaxMetaspaceSize=256m' -Dorg.gradle.workers.max=4
_JAVA_OPTIONS: -XX:ActiveProcessorCount=4 -Xmx1177m -XX:MaxMetaspaceSize=512m -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts
steps:
- checkout
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'unit-test-11-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --parallel --stacktrace --continue test -Pcom.palantir.baseline-error-prone.disable
- save_cache:
key: 'unit-test-11-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- run:
command: mkdir -p ~/junit && find . -type f -regex ".*/build/.*TEST.*xml" -exec cp --parents {} ~/junit/ \;
when: always
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }


unit-test-14:
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: large
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
GRADLE_OPTS: -Dorg.gradle.jvmargs='-XX:MaxMetaspaceSize=256m' -Dorg.gradle.workers.max=4
_JAVA_OPTIONS: -XX:ActiveProcessorCount=4 -Xmx1177m -XX:MaxMetaspaceSize=512m -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts
JAVA_HOME: /opt/java14
steps:
- checkout
- run:
name: Install Java
command: |
sudo mkdir -p /opt/java && cd /opt/java && sudo chown -R circleci:circleci .
curl https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-linux_x64.tar.gz | tar -xzf - -C /opt/java
sudo ln -s /opt/java/zulu*/ /opt/java14
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'unit-test-14-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --parallel --stacktrace --continue test -Pcom.palantir.baseline-error-prone.disable
- save_cache:
key: 'unit-test-14-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- run:
command: mkdir -p ~/junit && find . -type f -regex ".*/build/.*TEST.*xml" -exec cp --parents {} ~/junit/ \;
when: always
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }

trial-publish:
docker: [{ image: 'circleci/openjdk:8u222-stretch-node' }]
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: medium
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
Expand All @@ -172,7 +120,7 @@ jobs:
- store_artifacts: { path: ~/artifacts }

publish:
docker: [{ image: 'circleci/openjdk:8u222-stretch-node' }]
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: medium
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
Expand Down Expand Up @@ -212,12 +160,6 @@ workflows:
requires: [ compile ]
filters: { tags: { only: /.*/ } }

- unit-test-11:
filters: { tags: { only: /.*/ } }

- unit-test-14:
filters: { tags: { only: /.*/ } }

- check:
requires: [ compile ]
filters: { tags: { only: /.*/ } }
Expand All @@ -230,5 +172,5 @@ workflows:
filters: { branches: { ignore: develop } }

- publish:
requires: [ unit-test, unit-test-11, unit-test-14, check, trial-publish ]
requires: [ unit-test, check, trial-publish ]
filters: { tags: { only: /.*/ }, branches: { only: develop } }
2 changes: 1 addition & 1 deletion .circleci/template.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
export CIRCLECI_TEMPLATE=java-library-oss
export JAVA_11=true
export JDK=11

0 comments on commit ea51d04

Please sign in to comment.