Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 50 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,81 @@
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8u171-jdk-node-browsers
docker: [{ image: 'circleci/openjdk:8u171-node' }]
resource_class: xlarge
environment:
GRADLE_OPTS: -Dorg.gradle.console=plain -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts

_JAVA_OPTIONS: '-Xmx2048m'
steps:
- checkout
- restore_cache:
key: gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
- restore_cache:
key: gradle-cache-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}

- run: ./gradlew --profile --parallel resolveConfigurations

- restore_cache: { key: 'gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --no-daemon --parallel --stacktrace --continue --max-workers=8 --profile build
- save_cache:
key: gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
paths:
- ~/.gradle/wrapper
key: 'gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}'
paths: [ ~/.gradle/wrapper ]
- save_cache:
key: gradle-cache-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}
paths:
- ~/.gradle/caches

- run: ./gradlew --profile --parallel --continue build

key: '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/ \;
command: mkdir -p ~/junit && find . -type f -regex ".*/build/.*TEST.*xml" -exec cp --parents {} ~/junit/ \;
when: always

- deploy:
command: |
# publishing snapshots to bintray does not work, so we only publish from tag builds (not develop)
if [[ "${CIRCLE_TAG}" =~ [0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)* ]]; then
./gradlew --profile --stacktrace --continue publish
./gradlew --no-daemon --parallel --stacktrace --continue --max-workers=8 --profile publish
else
./gradlew --profile --parallel --continue publishToMavenLocal
./gradlew --no-daemon --parallel --stacktrace --continue --max-workers=8 --profile publishToMavenLocal
mkdir -p $CIRCLE_ARTIFACTS/poms
find . -name 'pom-default.xml' -exec cp --parents {} $CIRCLE_ARTIFACTS/poms \;
fi
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }

build-11:
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: xlarge
environment:
GRADLE_OPTS: -Dorg.gradle.console=plain -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
_JAVA_OPTIONS: '-XX:ActiveProcessorCount=8 -Xmx2048m'
steps:
- checkout
- restore_cache: { key: 'gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --no-daemon --parallel --stacktrace --continue --profile build
- save_cache:
key: 'gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}'
paths: [ ~/.gradle/wrapper ]
- save_cache:
key: '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 }

markdown:
docker: [{ image: 'raviqqe/liche:0.1.1' }]
steps:
- checkout
- run: /liche -d . -r . -v

workflows:
version: 2
build:
jobs:
- build:
filters:
# CircleCI2 will ignore tags without this. https://circleci.com/docs/2.0/workflows/#git-tag-job-execution
tags:
only: /.*/
# CircleCI2 will ignore tags without this. https://circleci.com/docs/2.0/workflows/#git-tag-job-execution
filters: { tags: { only: /.*/ } }
- build-11:
# CircleCI2 will ignore tags without this. https://circleci.com/docs/2.0/workflows/#git-tag-job-execution
filters: { tags: { only: /.*/ } }
- markdown:
# CircleCI2 will ignore tags without this. https://circleci.com/docs/2.0/workflows/#git-tag-job-execution
filters: { tags: { only: /.*/ } }