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
- name : Build project
84
63
run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' test
85
64
86
- - name : Make target directories
87
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
88
- run : mkdir -p target project/target
89
-
90
65
- name : Compress target directories
91
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
92
66
run : tar cf targets.tar target project/target
93
67
94
68
- name : Upload target directories
95
- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
96
69
uses : actions/upload-artifact@v3
97
70
with :
98
- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
71
+ name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
99
72
path : targets.tar
100
73
101
74
publish :
105
78
strategy :
106
79
matrix :
107
80
os : [ubuntu-latest]
81
+ scala : [2.13.12]
108
82
java : [zulu@8]
109
83
runs-on : ${{ matrix.os }}
110
84
steps :
@@ -114,80 +88,65 @@ jobs:
114
88
fetch-depth : 0
115
89
116
90
- name : Setup Java (zulu@8)
117
- id : setup-java-zulu-8
118
91
if : matrix.java == 'zulu@8'
119
92
uses : actions/setup-java@v3
120
93
with :
121
94
distribution : zulu
122
95
java-version : 8
123
96
cache : sbt
124
97
125
- - name : sbt update
126
- if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
127
- run : sbt -J-Xmx2G +update
128
-
129
98
- name : Setup Java (zulu@11)
130
- id : setup-java-zulu-11
131
99
if : matrix.java == 'zulu@11'
132
100
uses : actions/setup-java@v3
133
101
with :
134
102
distribution : zulu
135
103
java-version : 11
136
104
cache : sbt
137
105
138
- - name : sbt update
139
- if : matrix.java == 'zulu@11' && steps.setup-java-zulu-11.outputs.cache-hit == 'false'
140
- run : sbt -J-Xmx2G +update
141
-
142
106
- name : Setup Java (zulu@17)
143
- id : setup-java-zulu-17
144
107
if : matrix.java == 'zulu@17'
145
108
uses : actions/setup-java@v3
146
109
with :
147
110
distribution : zulu
148
111
java-version : 17
149
112
cache : sbt
150
113
151
- - name : sbt update
152
- if : matrix.java == 'zulu@17' && steps.setup-java-zulu-17.outputs.cache-hit == 'false'
153
- run : sbt -J-Xmx2G +update
154
-
155
- - name : Download target directories (2.11)
114
+ - name : Download target directories (2.11.12)
156
115
uses : actions/download-artifact@v3
157
116
with :
158
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.11
117
+ name : target-${{ matrix.os }}-2.11.12- ${{ matrix.java }}
159
118
160
- - name : Inflate target directories (2.11)
119
+ - name : Inflate target directories (2.11.12 )
161
120
run : |
162
121
tar xf targets.tar
163
122
rm targets.tar
164
123
165
- - name : Download target directories (2.12)
124
+ - name : Download target directories (2.12.18 )
166
125
uses : actions/download-artifact@v3
167
126
with :
168
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
127
+ name : target-${{ matrix.os }}-2.12.18- ${{ matrix.java }}
169
128
170
- - name : Inflate target directories (2.12)
129
+ - name : Inflate target directories (2.12.18 )
171
130
run : |
172
131
tar xf targets.tar
173
132
rm targets.tar
174
133
175
- - name : Download target directories (2.13)
134
+ - name : Download target directories (2.13.12 )
176
135
uses : actions/download-artifact@v3
177
136
with :
178
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
137
+ name : target-${{ matrix.os }}-2.13.12- ${{ matrix.java }}
179
138
180
- - name : Inflate target directories (2.13)
139
+ - name : Inflate target directories (2.13.12 )
181
140
run : |
182
141
tar xf targets.tar
183
142
rm targets.tar
184
143
185
- - name : Download target directories (3)
144
+ - name : Download target directories (3.3.1 )
186
145
uses : actions/download-artifact@v3
187
146
with :
188
- name : target-${{ matrix.os }}-${{ matrix.java }}-3
147
+ name : target-${{ matrix.os }}-3.3.1- ${{ matrix.java }}
189
148
190
- - name : Inflate target directories (3)
149
+ - name : Inflate target directories (3.3.1 )
191
150
run : |
192
151
tar xf targets.tar
193
152
rm targets.tar
0 commit comments