From ea51d0469b7781e20f65f0ac24fbe7d721b48117 Mon Sep 17 00:00:00 2001 From: Excavator Bot <33266368+svc-excavator-bot@users.noreply.github.com> Date: Mon, 30 Nov 2020 09:43:50 -0800 Subject: [PATCH] Excavator: Use Java 11 for building libraries (#66) Co-authored-by: svc-excavator-bot --- .circleci/config.yml | 70 ++++--------------------------------------- .circleci/template.sh | 2 +- 2 files changed, 7 insertions(+), 65 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3871e6c7..c12cc8d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: /.*/ } } @@ -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 } } diff --git a/.circleci/template.sh b/.circleci/template.sh index 5bc71869..e80105b4 100644 --- a/.circleci/template.sh +++ b/.circleci/template.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash export CIRCLECI_TEMPLATE=java-library-oss -export JAVA_11=true +export JDK=11