27
27
name : Build and Test
28
28
strategy :
29
29
matrix :
30
- os : [ubuntu-latest]
30
+ os : [ubuntu-latest, macos-latest, windows-latest ]
31
31
scala : [2.12]
32
32
java :
33
33
- temurin@8
36
36
- graalvm@17
37
37
- corretto@17
38
38
project : [sbt-typelevelJVM]
39
+ exclude :
40
+ - java : temurin@11
41
+ os : macos-latest
42
+ - java : temurin@11
43
+ os : windows-latest
44
+ - java : temurin@17
45
+ os : macos-latest
46
+ - java : temurin@17
47
+ os : windows-latest
48
+ - java : graalvm@17
49
+ os : macos-latest
50
+ - java : graalvm@17
51
+ os : windows-latest
52
+ - java : corretto@17
53
+ os : macos-latest
54
+ - java : corretto@17
55
+ os : windows-latest
39
56
runs-on : ${{ matrix.os }}
40
57
timeout-minutes : 60
41
58
steps :
59
+ - name : Ignore line ending differences in git
60
+ if : contains(runner.os, 'windows')
61
+ shell : bash
62
+ run : git config --global core.autocrlf false
63
+
42
64
- name : Checkout current branch (full)
43
65
uses : actions/checkout@v3
44
66
with :
55
77
56
78
- name : sbt update
57
79
if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
80
+ shell : bash
58
81
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
59
82
60
83
- name : Setup Java (temurin@11)
68
91
69
92
- name : sbt update
70
93
if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
94
+ shell : bash
71
95
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
72
96
73
97
- name : Setup Java (temurin@17)
81
105
82
106
- name : sbt update
83
107
if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
108
+ shell : bash
84
109
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
85
110
86
111
- name : Setup Java (graalvm@17)
94
119
95
120
- name : sbt update
96
121
if : matrix.java == 'graalvm@17' && steps.setup-java-graalvm-17.outputs.cache-hit == 'false'
122
+ shell : bash
97
123
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
98
124
99
125
- name : Setup Java (corretto@17)
@@ -107,36 +133,45 @@ jobs:
107
133
108
134
- name : sbt update
109
135
if : matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
136
+ shell : bash
110
137
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
111
138
112
139
- name : Check that workflows are up to date
140
+ shell : bash
113
141
run : sbt githubWorkflowCheck
114
142
115
143
- name : Check headers and formatting
116
144
if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
145
+ shell : bash
117
146
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
118
147
119
148
- name : Check scalafix lints
120
149
if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
150
+ shell : bash
121
151
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'
122
152
123
153
- name : Test
154
+ shell : bash
124
155
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
125
156
126
157
- name : Check binary compatibility
127
158
if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
159
+ shell : bash
128
160
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
129
161
130
162
- name : Generate API documentation
131
163
if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
164
+ shell : bash
132
165
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
133
166
134
167
- name : Make target directories
135
168
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
169
+ shell : bash
136
170
run : mkdir -p github/target github-actions/target kernel/target versioning/target ci-release/target scalafix/target site/target ci-signing/target mergify/target unidoc/target mima/target no-publish/target sonatype/target ci/target sonatype-ci-release/target core/target settings/target project/target
137
171
138
172
- name : Compress target directories
139
173
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
174
+ shell : bash
140
175
run : tar cf targets.tar github/target github-actions/target kernel/target versioning/target ci-release/target scalafix/target site/target ci-signing/target mergify/target unidoc/target mima/target no-publish/target sonatype/target ci/target sonatype-ci-release/target core/target settings/target project/target
141
176
142
177
- name : Upload target directories
@@ -157,6 +192,10 @@ jobs:
157
192
runs-on : ${{ matrix.os }}
158
193
timeout-minutes : 45
159
194
steps :
195
+ - name : Ignore line ending differences in git
196
+ if : contains(runner.os, 'windows')
197
+ run : git config --global core.autocrlf false
198
+
160
199
- name : Checkout current branch (full)
161
200
uses : actions/checkout@v3
162
201
with :
@@ -270,6 +309,10 @@ jobs:
270
309
java : [temurin@8]
271
310
runs-on : ${{ matrix.os }}
272
311
steps :
312
+ - name : Ignore line ending differences in git
313
+ if : contains(runner.os, 'windows')
314
+ run : git config --global core.autocrlf false
315
+
273
316
- name : Checkout current branch (full)
274
317
uses : actions/checkout@v3
275
318
with :
@@ -370,6 +413,10 @@ jobs:
370
413
java : [temurin@8]
371
414
runs-on : ${{ matrix.os }}
372
415
steps :
416
+ - name : Ignore line ending differences in git
417
+ if : contains(runner.os, 'windows')
418
+ run : git config --global core.autocrlf false
419
+
373
420
- name : Checkout current branch (full)
374
421
uses : actions/checkout@v3
375
422
with :
0 commit comments