15
15
tags : [v*]
16
16
17
17
env :
18
- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
19
- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
20
- SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
21
- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
22
- PGP_SECRET : ${{ secrets.PGP_SECRET }}
23
18
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24
19
20
+
21
+ concurrency :
22
+ group : ${{ github.workflow }} @ ${{ github.ref }}
23
+ cancel-in-progress : true
24
+
25
25
jobs :
26
26
build :
27
27
name : Build and Test
28
28
strategy :
29
29
matrix :
30
30
os : [ubuntu-latest]
31
- scala : [2.12.18 , 2.13.10 , 3.2.2 ]
32
- java : [temurin@8 ]
33
- project : [rootJS, rootJVM, rootNative ]
31
+ scala : [2.12, 2.13, 3]
32
+ java : [temurin@11 ]
33
+ project : [diffsonJVM, diffsonJS, diffsonNative ]
34
34
runs-on : ${{ matrix.os }}
35
+ timeout-minutes : 60
35
36
steps :
36
37
- name : Checkout current branch (full)
37
- uses : actions/checkout@v3
38
+ uses : actions/checkout@v4
38
39
with :
39
40
fetch-depth : 0
40
41
41
- - name : Download Java (temurin@8 )
42
- id : download -java-temurin-8
43
- if : matrix.java == 'temurin@8 '
44
- uses : typelevel/download -java@v2
42
+ - name : Setup Java (temurin@11 )
43
+ id : setup -java-temurin-11
44
+ if : matrix.java == 'temurin@11 '
45
+ uses : actions/setup -java@v4
45
46
with :
46
47
distribution : temurin
47
- java-version : 8
48
-
49
- - name : Setup Java (temurin@8)
50
- if : matrix.java == 'temurin@8'
51
- uses : actions/setup-java@v3
52
- with :
53
- distribution : jdkfile
54
- java-version : 8
55
- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
48
+ java-version : 11
49
+ cache : sbt
56
50
57
- - name : Cache sbt
58
- uses : actions/cache@v3
59
- with :
60
- path : |
61
- ~/.sbt
62
- ~/.ivy2/cache
63
- ~/.coursier/cache/v1
64
- ~/.cache/coursier/v1
65
- ~/AppData/Local/Coursier/Cache/v1
66
- ~/Library/Caches/Coursier/v1
67
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
51
+ - name : sbt update
52
+ if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
53
+ run : sbt +update
68
54
69
55
- name : Check that workflows are up to date
70
56
run : sbt githubWorkflowCheck
71
57
72
58
- name : Check headers and formatting
73
- if : matrix.java == 'temurin@8 ' && matrix.os == 'ubuntu-latest'
59
+ if : matrix.java == 'temurin@11 ' && matrix.os == 'ubuntu-latest'
74
60
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
75
61
76
62
- name : scalaJSLink
77
- if : matrix.project == 'rootJS '
63
+ if : matrix.project == 'diffsonJS '
78
64
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
79
65
80
66
- name : nativeLink
81
- if : matrix.project == 'rootNative '
67
+ if : matrix.project == 'diffsonNative '
82
68
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
83
69
84
70
- name : Test
85
71
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
86
72
87
73
- name : Check binary compatibility
88
- if : matrix.java == 'temurin@8 ' && matrix.os == 'ubuntu-latest'
74
+ if : matrix.java == 'temurin@11 ' && matrix.os == 'ubuntu-latest'
89
75
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
90
76
91
77
- name : Generate API documentation
92
- if : matrix.java == 'temurin@8 ' && matrix.os == 'ubuntu-latest'
78
+ if : matrix.java == 'temurin@11 ' && matrix.os == 'ubuntu-latest'
93
79
run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
94
80
95
81
- name : Make target directories
96
82
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
97
- run : mkdir -p circe/jvm/target testkit /native/target target testkit/js /target . js/target core/.native/target playJson/jvm/target benchmarks/.jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target .jvm/target .native/target circe/native/target playJson/js/target testkit/jvm/target project/target
83
+ run : mkdir -p circe/jvm/target playJson /native/target testkit/native /target testkit/ js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/. jvm/target project/target
98
84
99
85
- name : Compress target directories
100
86
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
101
- run : tar cf targets.tar circe/jvm/target testkit /native/target target testkit/js /target . js/target core/.native/target playJson/jvm/target benchmarks/.jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target .jvm/target .native/target circe/native/target playJson/js/target testkit/jvm/target project/target
87
+ run : tar cf targets.tar circe/jvm/target playJson /native/target testkit/native /target testkit/ js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/. jvm/target project/target
102
88
103
89
- name : Upload target directories
104
90
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -114,143 +100,170 @@ jobs:
114
100
strategy :
115
101
matrix :
116
102
os : [ubuntu-latest]
117
- scala : [2.13.10]
118
- java : [temurin@8]
103
+ java : [temurin@11]
119
104
runs-on : ${{ matrix.os }}
120
105
steps :
121
106
- name : Checkout current branch (full)
122
- uses : actions/checkout@v3
107
+ uses : actions/checkout@v4
123
108
with :
124
109
fetch-depth : 0
125
110
126
- - name : Download Java (temurin@8 )
127
- id : download -java-temurin-8
128
- if : matrix.java == 'temurin@8 '
129
- uses : typelevel/download -java@v2
111
+ - name : Setup Java (temurin@11 )
112
+ id : setup -java-temurin-11
113
+ if : matrix.java == 'temurin@11 '
114
+ uses : actions/setup -java@v4
130
115
with :
131
116
distribution : temurin
132
- java-version : 8
117
+ java-version : 11
118
+ cache : sbt
133
119
134
- - name : Setup Java (temurin@8)
135
- if : matrix.java == 'temurin@8'
136
- uses : actions/setup-java@v3
137
- with :
138
- distribution : jdkfile
139
- java-version : 8
140
- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
120
+ - name : sbt update
121
+ if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
122
+ run : sbt +update
141
123
142
- - name : Cache sbt
143
- uses : actions/cache@v3
144
- with :
145
- path : |
146
- ~/.sbt
147
- ~/.ivy2/cache
148
- ~/.coursier/cache/v1
149
- ~/.cache/coursier/v1
150
- ~/AppData/Local/Coursier/Cache/v1
151
- ~/Library/Caches/Coursier/v1
152
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
153
-
154
- - name : Download target directories (2.12.18, rootJS)
124
+ - name : Download target directories (2.12, diffsonJVM)
155
125
uses : actions/download-artifact@v3
156
126
with :
157
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJS
127
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonJVM
158
128
159
- - name : Inflate target directories (2.12.18, rootJS )
129
+ - name : Inflate target directories (2.12, diffsonJVM )
160
130
run : |
161
131
tar xf targets.tar
162
132
rm targets.tar
163
133
164
- - name : Download target directories (2.12.18, rootJVM )
134
+ - name : Download target directories (2.12, diffsonJS )
165
135
uses : actions/download-artifact@v3
166
136
with :
167
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJVM
137
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonJS
168
138
169
- - name : Inflate target directories (2.12.18, rootJVM )
139
+ - name : Inflate target directories (2.12, diffsonJS )
170
140
run : |
171
141
tar xf targets.tar
172
142
rm targets.tar
173
143
174
- - name : Download target directories (2.12.18, rootNative )
144
+ - name : Download target directories (2.12, diffsonNative )
175
145
uses : actions/download-artifact@v3
176
146
with :
177
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootNative
147
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonNative
178
148
179
- - name : Inflate target directories (2.12.18, rootNative )
149
+ - name : Inflate target directories (2.12, diffsonNative )
180
150
run : |
181
151
tar xf targets.tar
182
152
rm targets.tar
183
153
184
- - name : Download target directories (2.13.10, rootJS )
154
+ - name : Download target directories (2.13, diffsonJVM )
185
155
uses : actions/download-artifact@v3
186
156
with :
187
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJS
157
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonJVM
188
158
189
- - name : Inflate target directories (2.13.10, rootJS )
159
+ - name : Inflate target directories (2.13, diffsonJVM )
190
160
run : |
191
161
tar xf targets.tar
192
162
rm targets.tar
193
163
194
- - name : Download target directories (2.13.10, rootJVM )
164
+ - name : Download target directories (2.13, diffsonJS )
195
165
uses : actions/download-artifact@v3
196
166
with :
197
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM
167
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonJS
198
168
199
- - name : Inflate target directories (2.13.10, rootJVM )
169
+ - name : Inflate target directories (2.13, diffsonJS )
200
170
run : |
201
171
tar xf targets.tar
202
172
rm targets.tar
203
173
204
- - name : Download target directories (2.13.10, rootNative )
174
+ - name : Download target directories (2.13, diffsonNative )
205
175
uses : actions/download-artifact@v3
206
176
with :
207
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootNative
177
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonNative
208
178
209
- - name : Inflate target directories (2.13.10, rootNative )
179
+ - name : Inflate target directories (2.13, diffsonNative )
210
180
run : |
211
181
tar xf targets.tar
212
182
rm targets.tar
213
183
214
- - name : Download target directories (3.2.2, rootJS )
184
+ - name : Download target directories (3, diffsonJVM )
215
185
uses : actions/download-artifact@v3
216
186
with :
217
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJS
187
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonJVM
218
188
219
- - name : Inflate target directories (3.2.2, rootJS )
189
+ - name : Inflate target directories (3, diffsonJVM )
220
190
run : |
221
191
tar xf targets.tar
222
192
rm targets.tar
223
193
224
- - name : Download target directories (3.2.2, rootJVM )
194
+ - name : Download target directories (3, diffsonJS )
225
195
uses : actions/download-artifact@v3
226
196
with :
227
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJVM
197
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonJS
228
198
229
- - name : Inflate target directories (3.2.2, rootJVM )
199
+ - name : Inflate target directories (3, diffsonJS )
230
200
run : |
231
201
tar xf targets.tar
232
202
rm targets.tar
233
203
234
- - name : Download target directories (3.2.2, rootNative )
204
+ - name : Download target directories (3, diffsonNative )
235
205
uses : actions/download-artifact@v3
236
206
with :
237
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootNative
207
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonNative
238
208
239
- - name : Inflate target directories (3.2.2, rootNative )
209
+ - name : Inflate target directories (3, diffsonNative )
240
210
run : |
241
211
tar xf targets.tar
242
212
rm targets.tar
243
213
244
214
- name : Import signing key
245
215
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
246
- run : echo $PGP_SECRET | base64 -di | gpg --import
216
+ env :
217
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
218
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
219
+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
247
220
248
221
- name : Import signing key and strip passphrase
249
222
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
223
+ env :
224
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
225
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
250
226
run : |
251
- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
227
+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
252
228
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
253
229
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
254
230
255
231
- name : Publish
256
- run : sbt '++ ${{ matrix.scala }}' tlCiRelease
232
+ env :
233
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
234
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
235
+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
236
+ run : sbt tlCiRelease
237
+
238
+ dependency-submission :
239
+ name : Submit Dependencies
240
+ if : github.event_name != 'pull_request'
241
+ strategy :
242
+ matrix :
243
+ os : [ubuntu-latest]
244
+ java : [temurin@11]
245
+ runs-on : ${{ matrix.os }}
246
+ steps :
247
+ - name : Checkout current branch (full)
248
+ uses : actions/checkout@v4
249
+ with :
250
+ fetch-depth : 0
251
+
252
+ - name : Setup Java (temurin@11)
253
+ id : setup-java-temurin-11
254
+ if : matrix.java == 'temurin@11'
255
+ uses : actions/setup-java@v4
256
+ with :
257
+ distribution : temurin
258
+ java-version : 11
259
+ cache : sbt
260
+
261
+ - name : sbt update
262
+ if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
263
+ run : sbt +update
264
+
265
+ - name : Submit Dependencies
266
+ uses : scalacenter/sbt-dependency-submission@v2
267
+ with :
268
+ modules-ignore : diffsonjvm_2.12 diffsonjvm_2.13 diffsonjvm_3 diffsonjs_2.12 diffsonjs_2.13 diffsonjs_3 diffson-benchmarks_2.12 diffson-benchmarks_2.13 diffson-benchmarks_3 diffsonnative_2.12 diffsonnative_2.13 diffsonnative_3
269
+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments