From fa54c5beffdffc7b6535f16f9d0d51ad6bfe72e9 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Nov 2017 10:45:19 -0800 Subject: [PATCH] Added workflow to build both in Gradle and Kobalt. --- .circleci/config.yml | 50 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8eea21..2fb057c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2 jobs: - build: + checkout_code: docker: - image: circleci/openjdk:8-jdk @@ -12,6 +12,11 @@ jobs: steps: - checkout + + build_gradle: + working_directory: ~/repo + + steps: - restore_cache: keys: - gradle-dependencies-{{ checksum "build.gradle" }} @@ -34,4 +39,45 @@ jobs: path: build/reports/ destination: reports - store_test_results: - path: build/reports/ \ No newline at end of file + path: build/reports/ + + build_kobalt: + working_directory: ~/repo + + steps: + - restore_cache: + keys: + - kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} + # fallback to using the latest cache if no exact match is found + - kobalt-dependencies- + + - run: + name: Check Versions + command: ./kobaltw checkVersions + + - save_cache: + paths: ~/.kobalt + key: kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} + + - run: + name: Assemble & Test + command: ./kobaltw assemble test + + - store_artifacts: + path: kobaltBuild/test-output/ + destination: test-output + - store_test_results: + path: kobaltBuild/test-output/ + +workflows: + version: 2 + build_gradle_and_kobalt: + jobs: + - checkout_code + - build_gradle + requires: + - checkout_code + + - build_kobalt + requires: + - checkout_code \ No newline at end of file