Skip to content

Commit

Permalink
Excavator: Use Java 11 for building libraries (#1050)
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 Dec 1, 2020
1 parent ba4833f commit c96d7ef
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 39 deletions.
62 changes: 23 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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" }}' }
Expand All @@ -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
Expand All @@ -96,59 +97,45 @@ 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 ]
- store_test_results: { path: ~/junit }
- 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 ]
Expand All @@ -173,9 +160,6 @@ workflows:
requires: [ compile ]
filters: { tags: { only: /.*/ } }

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

- check:
requires: [ compile ]
filters: { tags: { only: /.*/ } }
Expand All @@ -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 } }
1 change: 1 addition & 0 deletions .circleci/template.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env bash
export CIRCLECI_TEMPLATE=java-library-oss
export JDK=11

0 comments on commit c96d7ef

Please sign in to comment.