@@ -9,248 +9,112 @@ name: Continuous Integration
9
9
10
10
on :
11
11
pull_request :
12
- branches : ['**', '!update/**', '!pr/**' ]
12
+ branches : ['**']
13
13
push :
14
- branches : ['**', '!update/**', '!pr/**']
15
- tags : [v*]
14
+ branches : ['**']
16
15
17
16
env :
18
17
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
18
20
-
21
- concurrency :
22
- group : ${{ github.workflow }} @ ${{ github.ref }}
23
- cancel-in-progress : true
24
-
25
19
jobs :
26
20
build :
27
21
name : Build and Test
28
22
strategy :
29
23
matrix :
30
24
os : [ubuntu-latest]
31
- scala : [2.12, 2.13, 3]
25
+ scala : [2.12.17 , 2.13.14, 3.3. 3]
32
26
java : [corretto@11]
33
- project : [rootJS, rootJVM, rootNative]
34
- include :
35
- - scala : 3
36
- java : corretto@11
37
- project : rootNative
38
- os : macos-latest
39
- exclude :
40
- - scala : 3
41
- project : rootJVM
42
- - scala : 3
43
- project : rootNative
44
- os : ubuntu-latest
45
27
runs-on : ${{ matrix.os }}
46
- timeout-minutes : 60
47
28
steps :
29
+ - uses : pierotofy/set-swap-space@master
30
+ with :
31
+ swap-size-gb : 5
32
+
48
33
- name : Checkout current branch (full)
49
34
uses : actions/checkout@v4
50
35
with :
51
36
fetch-depth : 0
52
37
53
38
- name : Setup Java (corretto@11)
54
- id : setup-java-corretto-11
55
39
if : matrix.java == 'corretto@11'
56
40
uses : actions/setup-java@v4
57
41
with :
58
42
distribution : corretto
59
43
java-version : 11
60
44
cache : sbt
61
45
62
- - name : sbt update
63
- if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
64
- run : ./sbt +update
65
-
66
46
- name : Check that workflows are up to date
67
- run : ./sbt githubWorkflowCheck
68
-
69
- - name : scalaJSLink
70
- if : matrix.project == 'rootJS'
71
- run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
72
-
73
- - name : nativeLink
74
- if : matrix.project == 'rootNative'
75
- run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
76
-
77
- - name : Test
78
- run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
79
-
80
- - name : Check binary compatibility
81
- if : matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest'
82
- run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
47
+ run : ./sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
83
48
84
- - name : Generate API documentation
85
- if : matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest'
86
- run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
87
-
88
- - name : Make target directories
89
- if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
90
- run : mkdir -p core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
49
+ - name : Build project
50
+ run : ./sbt '++ ${{ matrix.scala }}' test
91
51
92
52
- name : Compress target directories
93
- if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
94
- run : tar cf targets.tar core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
53
+ run : tar cf targets.tar target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js/target project/target
95
54
96
55
- name : Upload target directories
97
- if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
98
56
uses : actions/upload-artifact@v4
99
57
with :
100
- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix. scala }}-${{ matrix.project }}
58
+ name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
101
59
path : targets.tar
102
60
103
61
publish :
104
62
name : Publish Artifacts
105
63
needs : [build]
106
- if : github.event_name != 'pull_request' && (startsWith( github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master ')
64
+ if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main ')
107
65
strategy :
108
66
matrix :
109
67
os : [ubuntu-latest]
68
+ scala : [2.13.14]
110
69
java : [corretto@11]
111
70
runs-on : ${{ matrix.os }}
112
71
steps :
72
+ - uses : pierotofy/set-swap-space@master
73
+ with :
74
+ swap-size-gb : 5
75
+
113
76
- name : Checkout current branch (full)
114
77
uses : actions/checkout@v4
115
78
with :
116
79
fetch-depth : 0
117
80
118
81
- name : Setup Java (corretto@11)
119
- id : setup-java-corretto-11
120
82
if : matrix.java == 'corretto@11'
121
83
uses : actions/setup-java@v4
122
84
with :
123
85
distribution : corretto
124
86
java-version : 11
125
87
cache : sbt
126
88
127
- - name : sbt update
128
- if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
129
- run : ./sbt +update
130
-
131
- - name : Download target directories (2.12, rootJS)
132
- uses : actions/download-artifact@v4
133
- with :
134
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
135
-
136
- - name : Inflate target directories (2.12, rootJS)
137
- run : |
138
- tar xf targets.tar
139
- rm targets.tar
140
-
141
- - name : Download target directories (2.12, rootJVM)
142
- uses : actions/download-artifact@v4
143
- with :
144
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
145
-
146
- - name : Inflate target directories (2.12, rootJVM)
147
- run : |
148
- tar xf targets.tar
149
- rm targets.tar
150
-
151
- - name : Download target directories (2.12, rootNative)
152
- uses : actions/download-artifact@v4
153
- with :
154
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
155
-
156
- - name : Inflate target directories (2.12, rootNative)
157
- run : |
158
- tar xf targets.tar
159
- rm targets.tar
160
-
161
- - name : Download target directories (2.13, rootJS)
89
+ - name : Download target directories (2.12.17)
162
90
uses : actions/download-artifact@v4
163
91
with :
164
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
92
+ name : target-${{ matrix.os }}-2.12.17- ${{ matrix.java }}
165
93
166
- - name : Inflate target directories (2.13, rootJS )
94
+ - name : Inflate target directories (2.12.17 )
167
95
run : |
168
96
tar xf targets.tar
169
97
rm targets.tar
170
98
171
- - name : Download target directories (2.13, rootJVM )
99
+ - name : Download target directories (2.13.14 )
172
100
uses : actions/download-artifact@v4
173
101
with :
174
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
102
+ name : target-${{ matrix.os }}-2.13.14- ${{ matrix.java }}
175
103
176
- - name : Inflate target directories (2.13, rootJVM )
104
+ - name : Inflate target directories (2.13.14 )
177
105
run : |
178
106
tar xf targets.tar
179
107
rm targets.tar
180
108
181
- - name : Download target directories (2.13, rootNative )
109
+ - name : Download target directories (3.3.3 )
182
110
uses : actions/download-artifact@v4
183
111
with :
184
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
112
+ name : target-${{ matrix.os }}-3.3.3- ${{ matrix.java }}
185
113
186
- - name : Inflate target directories (2.13, rootNative )
114
+ - name : Inflate target directories (3.3.3 )
187
115
run : |
188
116
tar xf targets.tar
189
117
rm targets.tar
190
118
191
- - name : Download target directories (3, rootJS)
192
- uses : actions/download-artifact@v4
193
- with :
194
- name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
195
-
196
- - name : Inflate target directories (3, rootJS)
197
- run : |
198
- tar xf targets.tar
199
- rm targets.tar
200
-
201
- - name : Import signing key
202
- if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
203
- env :
204
- PGP_SECRET : ${{ secrets.PGP_SECRET }}
205
- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
206
- run : echo $PGP_SECRET | base64 -d -i - | gpg --import
207
-
208
- - name : Import signing key and strip passphrase
209
- if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
210
- env :
211
- PGP_SECRET : ${{ secrets.PGP_SECRET }}
212
- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
213
- run : |
214
- echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
215
- echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
216
- (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)
217
-
218
- - name : Publish
219
- env :
220
- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
221
- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
222
- SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
223
- run : ./sbt tlCiRelease
224
-
225
- dependency-submission :
226
- name : Submit Dependencies
227
- if : github.event_name != 'pull_request'
228
- strategy :
229
- matrix :
230
- os : [ubuntu-latest]
231
- java : [corretto@11]
232
- runs-on : ${{ matrix.os }}
233
- steps :
234
- - name : Checkout current branch (full)
235
- uses : actions/checkout@v4
236
- with :
237
- fetch-depth : 0
238
-
239
- - name : Setup Java (corretto@11)
240
- id : setup-java-corretto-11
241
- if : matrix.java == 'corretto@11'
242
- uses : actions/setup-java@v4
243
- with :
244
- distribution : corretto
245
- java-version : 11
246
- cache : sbt
247
-
248
- - name : sbt update
249
- if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
250
- run : ./sbt +update
251
-
252
- - name : Submit Dependencies
253
- uses : scalacenter/sbt-dependency-submission@v2
254
- with :
255
- modules-ignore : rootjs_2.12 rootjs_2.13 rootjs_3 tests_sjs1_2.12 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 demo_2.12 demo_2.13 demo_3 tests_2.12 tests_2.13 tests_3 demo_native0.5_2.12 demo_native0.5_2.13 demo_native0.5_3 tests_native0.5_2.12 tests_native0.5_2.13 tests_native0.5_3 demo_sjs1_2.12 demo_sjs1_2.13 demo_sjs1_3
256
- configs-ignore : test scala-tool scala-doc-tool test-internal
119
+ - name : Publish project
120
+ run : ./sbt +publish
0 commit comments