17
17
env :
18
18
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
19
20
-
21
- concurrency :
22
- group : ${{ github.workflow }} @ ${{ github.ref }}
23
- cancel-in-progress : true
24
-
25
20
jobs :
26
21
build :
27
22
name : Build and Test
28
23
strategy :
29
24
matrix :
30
25
os : [ubuntu-latest]
31
- scala : [2.11, 2.12, 2.13, 3]
26
+ scala : [2.11.12 , 2.12.18 , 2.13.12 , 3.3.1 ]
32
27
java : [zulu@8, zulu@11, zulu@17]
33
28
runs-on : ${{ matrix.os }}
34
- timeout-minutes : 60
35
29
steps :
36
30
- name : Checkout current branch (full)
37
31
uses : actions/checkout@v4
38
32
with :
39
33
fetch-depth : 0
40
34
41
35
- name : Setup Java (zulu@8)
42
- id : setup-java-zulu-8
43
36
if : matrix.java == 'zulu@8'
44
37
uses : actions/setup-java@v3
45
38
with :
46
39
distribution : zulu
47
40
java-version : 8
48
41
cache : sbt
49
42
50
- - name : sbt update
51
- if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
52
- run : sbt -J-Xmx2G +update
53
-
54
43
- name : Setup Java (zulu@11)
55
- id : setup-java-zulu-11
56
44
if : matrix.java == 'zulu@11'
57
45
uses : actions/setup-java@v3
58
46
with :
59
47
distribution : zulu
60
48
java-version : 11
61
49
cache : sbt
62
50
63
- - name : sbt update
64
- if : matrix.java == 'zulu@11' && steps.setup-java-zulu-11.outputs.cache-hit == 'false'
65
- run : sbt -J-Xmx2G +update
66
-
67
51
- name : Setup Java (zulu@17)
68
- id : setup-java-zulu-17
69
52
if : matrix.java == 'zulu@17'
70
53
uses : actions/setup-java@v3
71
54
with :
72
55
distribution : zulu
73
56
java-version : 17
74
57
cache : sbt
75
58
76
- - name : sbt update
77
- if : matrix.java == 'zulu@17' && steps.setup-java-zulu-17.outputs.cache-hit == 'false'
78
- run : sbt -J-Xmx2G +update
79
-
80
59
- name : Check that workflows are up to date
81
- run : sbt -J-Xmx2G githubWorkflowCheck
60
+ run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' githubWorkflowCheck
82
61
83
62
- run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' test mimaReportBinaryIssues
84
63
85
- - name : Make target directories
86
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
87
- run : mkdir -p target project/target
88
-
89
64
- name : Compress target directories
90
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
91
65
run : tar cf targets.tar target project/target
92
66
93
67
- name : Upload target directories
94
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
95
68
uses : actions/upload-artifact@v3
96
69
with :
97
- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
70
+ name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
98
71
path : targets.tar
99
72
100
73
publish :
104
77
strategy :
105
78
matrix :
106
79
os : [ubuntu-latest]
80
+ scala : [2.13.12]
107
81
java : [zulu@8]
108
82
runs-on : ${{ matrix.os }}
109
83
steps :
@@ -113,80 +87,65 @@ jobs:
113
87
fetch-depth : 0
114
88
115
89
- name : Setup Java (zulu@8)
116
- id : setup-java-zulu-8
117
90
if : matrix.java == 'zulu@8'
118
91
uses : actions/setup-java@v3
119
92
with :
120
93
distribution : zulu
121
94
java-version : 8
122
95
cache : sbt
123
96
124
- - name : sbt update
125
- if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
126
- run : sbt -J-Xmx2G +update
127
-
128
97
- name : Setup Java (zulu@11)
129
- id : setup-java-zulu-11
130
98
if : matrix.java == 'zulu@11'
131
99
uses : actions/setup-java@v3
132
100
with :
133
101
distribution : zulu
134
102
java-version : 11
135
103
cache : sbt
136
104
137
- - name : sbt update
138
- if : matrix.java == 'zulu@11' && steps.setup-java-zulu-11.outputs.cache-hit == 'false'
139
- run : sbt -J-Xmx2G +update
140
-
141
105
- name : Setup Java (zulu@17)
142
- id : setup-java-zulu-17
143
106
if : matrix.java == 'zulu@17'
144
107
uses : actions/setup-java@v3
145
108
with :
146
109
distribution : zulu
147
110
java-version : 17
148
111
cache : sbt
149
112
150
- - name : sbt update
151
- if : matrix.java == 'zulu@17' && steps.setup-java-zulu-17.outputs.cache-hit == 'false'
152
- run : sbt -J-Xmx2G +update
153
-
154
- - name : Download target directories (2.11)
113
+ - name : Download target directories (2.11.12)
155
114
uses : actions/download-artifact@v3
156
115
with :
157
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.11
116
+ name : target-${{ matrix.os }}-2.11.12- ${{ matrix.java }}
158
117
159
- - name : Inflate target directories (2.11)
118
+ - name : Inflate target directories (2.11.12 )
160
119
run : |
161
120
tar xf targets.tar
162
121
rm targets.tar
163
122
164
- - name : Download target directories (2.12)
123
+ - name : Download target directories (2.12.18 )
165
124
uses : actions/download-artifact@v3
166
125
with :
167
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
126
+ name : target-${{ matrix.os }}-2.12.18- ${{ matrix.java }}
168
127
169
- - name : Inflate target directories (2.12)
128
+ - name : Inflate target directories (2.12.18 )
170
129
run : |
171
130
tar xf targets.tar
172
131
rm targets.tar
173
132
174
- - name : Download target directories (2.13)
133
+ - name : Download target directories (2.13.12 )
175
134
uses : actions/download-artifact@v3
176
135
with :
177
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
136
+ name : target-${{ matrix.os }}-2.13.12- ${{ matrix.java }}
178
137
179
- - name : Inflate target directories (2.13)
138
+ - name : Inflate target directories (2.13.12 )
180
139
run : |
181
140
tar xf targets.tar
182
141
rm targets.tar
183
142
184
- - name : Download target directories (3)
143
+ - name : Download target directories (3.3.1 )
185
144
uses : actions/download-artifact@v3
186
145
with :
187
- name : target-${{ matrix.os }}-${{ matrix.java }}-3
146
+ name : target-${{ matrix.os }}-3.3.1- ${{ matrix.java }}
188
147
189
- - name : Inflate target directories (3)
148
+ - name : Inflate target directories (3.3.1 )
190
149
run : |
191
150
tar xf targets.tar
192
151
rm targets.tar
0 commit comments