From 2fe72e84fd9e303da4fac5a0b98988d09fd286ba Mon Sep 17 00:00:00 2001 From: Carlton Whitehead Date: Thu, 24 Aug 2023 20:01:12 -0400 Subject: [PATCH] Add Windows build to CircleCI --- .circleci/config.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15e85219..df62ddef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 orbs: gradle: circleci/gradle@1.0.10 + win: circleci/windows@5.0 _defaults: &defaults working_directory: ~/code environment: @@ -10,6 +11,10 @@ _gradle_checksum: &gradle_checksum command: >- find . -name 'build.gradle' | sort | xargs cat | shasum | awk '{print $1}' > /tmp/gradle_cache_seed +_gradle_checksum_windows: &gradle_checksum_windows + name: Generate Cache Checksum (Windows) + command: >- + Get-ChildItem -Filter *.gradle* -Recurse | Get-FileHash | Out-File -FilePath ".circleci/gradle_cache_seed" jobs: build-linux: docker: @@ -79,6 +84,29 @@ jobs: key: >- gradle-{{ checksum "/tmp/gradle_cache_seed" }}-{{ checksum ".circleci/config.yml" }}-macos + build-windows: + executor: + name: win/default + size: large + steps: + - checkout + - run: + <<: *gradle_checksum_windows + - restore_cache: + key: >- + gradle-{{ checksum ".circleci/gradle_cache_seed" }}-{{ checksum + ".circleci/config.yml" }}-windows + - run: + command: ./gradlew --no-daemon build + shell: bash.exe + - save_cache: + paths: + - ~/.gradle/caches + - ~/.gradle/wrapper + - ~/.konan + key: >- + gradle-{{ checksum ".circleci/gradle_cache_seed" }}-{{ checksum + ".circleci/config.yml" }}-windows workflows: version: 2 build: @@ -91,6 +119,10 @@ workflows: filters: branches: ignore: main + - build-windows: + filters: + branches: + ignore: main - build-linux: context: opensource-maven filters: