From 4c5881a694ddf1a2469eefaace4c15e5ffb2a08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Villar?= Date: Sat, 16 Sep 2023 14:01:19 -0400 Subject: [PATCH] parallel ci (#373) --- .circleci/config.yml | 86 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f6de250..125498fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,16 +3,13 @@ orbs: codecov: codecov/codecov@1.0.5 executor: machine jobs: - build: + ktlint: machine: - image: ubuntu-2004:2023.02.1 - + image: 'ubuntu-2004:2023.02.1' working_directory: ~/repo - environment: - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false' + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false TERM: dumb - steps: - checkout - run: @@ -21,35 +18,86 @@ jobs: - run: name: assemble command: ./gradlew assemble + assemble: + machine: + image: 'ubuntu-2004:2023.02.1' + working_directory: ~/repo + environment: + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false + TERM: dumb + steps: + - checkout + - run: + name: assemble + command: ./gradlew assemble + pluginTest: + machine: + image: 'ubuntu-2004:2023.02.1' + working_directory: ~/repo + environment: + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false + TERM: dumb + steps: + - checkout + - run: + name: style + command: ./gradlew collectUnitTest + publisherTest: + machine: + image: 'ubuntu-2004:2023.02.1' + working_directory: ~/repo + environment: + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false + TERM: dumb + steps: + - checkout - run: - name: test plugins - command: | - java --version - ./gradlew collectUnitTest --stacktrace --info + name: style + command: ./gradlew collectUnitTestLibs + sample: + machine: + image: 'ubuntu-2004:2023.02.1' + working_directory: ~/repo + environment: + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false + TERM: dumb + steps: + - checkout - run: - name: test libs + name: build sample command: | - java --version - ./gradlew collectUnitTestLibs --stacktrace --info - + cd sample + ./gradlew assemble deploy-snapshot: - working_directory: ~/repo machine: - image: ubuntu-2004:2023.02.1 + image: 'ubuntu-2004:2023.02.1' steps: - checkout - run: name: snapshot command: ./gradlew publishTalaiotLibPublicationToSnapshotsRepository - workflows: version: 2.1 build-snap: jobs: - - build + - ktlint + - assemble + - pluginTest + - publisherTest - deploy-snapshot: requires: - - build + - assemble + - ktlint + - assemble + - pluginTest + - publisherTest filters: branches: only: master + - sample: + requires: + - assemble + - ktlint + - assemble + - pluginTest + - publisherTest