Skip to content

Commit 2fe72e8

Browse files
carltonwhiteheadevant
authored andcommitted
Add Windows build to CircleCI
1 parent cee9597 commit 2fe72e8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.circleci/config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 2.1
22
orbs:
33
gradle: circleci/[email protected]
4+
win: circleci/[email protected]
45
_defaults: &defaults
56
working_directory: ~/code
67
environment:
@@ -10,6 +11,10 @@ _gradle_checksum: &gradle_checksum
1011
command: >-
1112
find . -name 'build.gradle' | sort | xargs cat | shasum | awk '{print
1213
$1}' > /tmp/gradle_cache_seed
14+
_gradle_checksum_windows: &gradle_checksum_windows
15+
name: Generate Cache Checksum (Windows)
16+
command: >-
17+
Get-ChildItem -Filter *.gradle* -Recurse | Get-FileHash | Out-File -FilePath ".circleci/gradle_cache_seed"
1318
jobs:
1419
build-linux:
1520
docker:
@@ -79,6 +84,29 @@ jobs:
7984
key: >-
8085
gradle-{{ checksum "/tmp/gradle_cache_seed" }}-{{ checksum
8186
".circleci/config.yml" }}-macos
87+
build-windows:
88+
executor:
89+
name: win/default
90+
size: large
91+
steps:
92+
- checkout
93+
- run:
94+
<<: *gradle_checksum_windows
95+
- restore_cache:
96+
key: >-
97+
gradle-{{ checksum ".circleci/gradle_cache_seed" }}-{{ checksum
98+
".circleci/config.yml" }}-windows
99+
- run:
100+
command: ./gradlew --no-daemon build
101+
shell: bash.exe
102+
- save_cache:
103+
paths:
104+
- ~/.gradle/caches
105+
- ~/.gradle/wrapper
106+
- ~/.konan
107+
key: >-
108+
gradle-{{ checksum ".circleci/gradle_cache_seed" }}-{{ checksum
109+
".circleci/config.yml" }}-windows
82110
workflows:
83111
version: 2
84112
build:
@@ -91,6 +119,10 @@ workflows:
91119
filters:
92120
branches:
93121
ignore: main
122+
- build-windows:
123+
filters:
124+
branches:
125+
ignore: main
94126
- build-linux:
95127
context: opensource-maven
96128
filters:

0 commit comments

Comments
 (0)