From c96d7ef4fa2e18ccec82e6b2c4ad868b568a099d Mon Sep 17 00:00:00 2001 From: Excavator Bot <33266368+svc-excavator-bot@users.noreply.github.com> Date: Mon, 30 Nov 2020 17:45:52 -0800 Subject: [PATCH] Excavator: Use Java 11 for building libraries (#1050) Co-authored-by: svc-excavator-bot --- .circleci/config.yml | 62 ++++++++++++++++--------------------------- .circleci/template.sh | 1 + 2 files changed, 24 insertions(+), 39 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4def0531..c12cc8d95 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,13 +5,13 @@ 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 CIRCLE_ARTIFACTS: /home/circleci/artifacts - GRADLE_OPTS: -Dorg.gradle.jvmargs='-Xms6144m -Xmx6144m' - _JAVA_OPTIONS: -XX:ActiveProcessorCount=4 -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/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 - run: @@ -54,12 +54,13 @@ 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 CIRCLE_ARTIFACTS: /home/circleci/artifacts - GRADLE_OPTS: -Dorg.gradle.jvmargs='-Xms3072m -Xmx3072m' - _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts + GRADLE_OPTS: -Dorg.gradle.jvmargs='-XX:MaxMetaspaceSize=256m' -Dorg.gradle.workers.max=2 + _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -Xmx938m -XX:MaxMetaspaceSize=512m -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts steps: - attach_workspace: { at: /home/circleci } - restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' } @@ -75,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 @@ -96,40 +97,22 @@ 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 } - 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 CIRCLE_ARTIFACTS: /home/circleci/artifacts - GRADLE_OPTS: -Dorg.gradle.jvmargs='-Xms3072m -Xmx3072m' - _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts + GRADLE_OPTS: -Dorg.gradle.jvmargs='-XX:MaxMetaspaceSize=256m' -Dorg.gradle.workers.max=2 + _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -Xmx938m -XX:MaxMetaspaceSize=512m -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts steps: - attach_workspace: { at: /home/circleci } - restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' } - restore_cache: { key: 'trial-publish-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' } - run: ./gradlew --stacktrace publishToMavenLocal + - run: + command: git status --porcelain + when: always - save_cache: key: 'trial-publish-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' paths: [ ~/.gradle/caches ] @@ -137,18 +120,22 @@ 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 CIRCLE_ARTIFACTS: /home/circleci/artifacts - GRADLE_OPTS: -Dorg.gradle.jvmargs='-Xms3072m -Xmx3072m' - _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts + GRADLE_OPTS: -Dorg.gradle.jvmargs='-XX:MaxMetaspaceSize=256m' -Dorg.gradle.workers.max=2 + _JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -Xmx938m -XX:MaxMetaspaceSize=512m -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts steps: - attach_workspace: { at: /home/circleci } - restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' } - restore_cache: { key: 'publish-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' } - deploy: command: ./gradlew --parallel --stacktrace --continue publish + - run: + command: git status --porcelain + when: always - save_cache: key: 'publish-gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' paths: [ ~/.gradle/caches ] @@ -173,9 +160,6 @@ workflows: requires: [ compile ] filters: { tags: { only: /.*/ } } - - unit-test-11: - filters: { tags: { only: /.*/ } } - - check: requires: [ compile ] filters: { tags: { only: /.*/ } } @@ -188,5 +172,5 @@ workflows: filters: { branches: { ignore: develop } } - publish: - requires: [ unit-test, unit-test-11, 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 5907b28a6..e80105b40 100644 --- a/.circleci/template.sh +++ b/.circleci/template.sh @@ -1,2 +1,3 @@ #!/usr/bin/env bash export CIRCLECI_TEMPLATE=java-library-oss +export JDK=11