3030 os : [ubuntu-latest]
3131 scala : [3.0.2, 2.11.12, 2.12.16, 2.13.8]
3232 java : [temurin@8]
33+ project : [rootJS, rootJVM]
3334 runs-on : ${{ matrix.os }}
3435 steps :
3536 - name : Checkout current branch (full)
@@ -66,27 +67,40 @@ jobs:
6667 key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
6768
6869 - name : Check that workflows are up to date
69- run : sbt '++${{ matrix.scala }}' 'project /' githubWorkflowCheck
70+ run : sbt 'project ${{ matrix.project }}' ' ++${{ matrix.scala }}' 'project /' githubWorkflowCheck
7071
71- - run : |
72- sbt ++${{ matrix.scala }} fmtCheck \
73- "++${{ matrix.scala }} test" \
74- "++${{ matrix.scala }} doc" \
75- "++${{ matrix.scala }} mimaReportBinaryIssues"
72+ - name : Check headers and formatting
73+ if : matrix.java == 'temurin@8'
74+ run : sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
75+
76+ - name : scalaJSLink
77+ if : matrix.project == 'rootJS'
78+ run : sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/scalaJSLinkerResult
79+
80+ - name : Test
81+ run : sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test
82+
83+ - name : Check binary compatibility
84+ if : matrix.java == 'temurin@8'
85+ run : sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' mimaReportBinaryIssues
86+
87+ - name : Generate API documentation
88+ if : matrix.java == 'temurin@8'
89+ run : sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc
7690
7791 - name : Make target directories
7892 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
79- run : mkdir -p target docs /target core/js/target core/jvm/target project/target
93+ run : mkdir -p target .js /target site/target core/js/target core/jvm/target .jvm/target .native /target project/target
8094
8195 - name : Compress target directories
8296 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
83- run : tar cf targets.tar target docs /target core/js/target core/jvm/target project/target
97+ run : tar cf targets.tar target .js /target site/target core/js/target core/jvm/target .jvm/target .native /target project/target
8498
8599 - name : Upload target directories
86100 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
87101 uses : actions/upload-artifact@v2
88102 with :
89- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
103+ name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
90104 path : targets.tar
91105
92106 publish :
@@ -133,42 +147,82 @@ jobs:
133147 ~/Library/Caches/Coursier/v1
134148 key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
135149
136- - name : Download target directories (3.0.2)
150+ - name : Download target directories (3.0.2, rootJS)
151+ uses : actions/download-artifact@v2
152+ with :
153+ name : target-${{ matrix.os }}-${{ matrix.java }}-3.0.2-rootJS
154+
155+ - name : Inflate target directories (3.0.2, rootJS)
156+ run : |
157+ tar xf targets.tar
158+ rm targets.tar
159+
160+ - name : Download target directories (3.0.2, rootJVM)
161+ uses : actions/download-artifact@v2
162+ with :
163+ name : target-${{ matrix.os }}-${{ matrix.java }}-3.0.2-rootJVM
164+
165+ - name : Inflate target directories (3.0.2, rootJVM)
166+ run : |
167+ tar xf targets.tar
168+ rm targets.tar
169+
170+ - name : Download target directories (2.11.12, rootJS)
137171 uses : actions/download-artifact@v2
138172 with :
139- name : target-${{ matrix.os }}-${{ matrix.java }}-3.0.2
173+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.11.12-rootJS
140174
141- - name : Inflate target directories (3.0.2 )
175+ - name : Inflate target directories (2.11.12, rootJS )
142176 run : |
143177 tar xf targets.tar
144178 rm targets.tar
145179
146- - name : Download target directories (2.11.12)
180+ - name : Download target directories (2.11.12, rootJVM )
147181 uses : actions/download-artifact@v2
148182 with :
149- name : target-${{ matrix.os }}-${{ matrix.java }}-2.11.12
183+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.11.12-rootJVM
150184
151- - name : Inflate target directories (2.11.12)
185+ - name : Inflate target directories (2.11.12, rootJVM )
152186 run : |
153187 tar xf targets.tar
154188 rm targets.tar
155189
156- - name : Download target directories (2.12.16)
190+ - name : Download target directories (2.12.16, rootJS )
157191 uses : actions/download-artifact@v2
158192 with :
159- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.16
193+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.16-rootJS
160194
161- - name : Inflate target directories (2.12.16)
195+ - name : Inflate target directories (2.12.16, rootJS )
162196 run : |
163197 tar xf targets.tar
164198 rm targets.tar
165199
166- - name : Download target directories (2.13.8 )
200+ - name : Download target directories (2.12.16, rootJVM )
167201 uses : actions/download-artifact@v2
168202 with :
169- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.8
203+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.16-rootJVM
170204
171- - name : Inflate target directories (2.13.8)
205+ - name : Inflate target directories (2.12.16, rootJVM)
206+ run : |
207+ tar xf targets.tar
208+ rm targets.tar
209+
210+ - name : Download target directories (2.13.8, rootJS)
211+ uses : actions/download-artifact@v2
212+ with :
213+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJS
214+
215+ - name : Inflate target directories (2.13.8, rootJS)
216+ run : |
217+ tar xf targets.tar
218+ rm targets.tar
219+
220+ - name : Download target directories (2.13.8, rootJVM)
221+ uses : actions/download-artifact@v2
222+ with :
223+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM
224+
225+ - name : Inflate target directories (2.13.8, rootJVM)
172226 run : |
173227 tar xf targets.tar
174228 rm targets.tar
@@ -187,8 +241,8 @@ jobs:
187241 - name : Publish
188242 run : sbt '++${{ matrix.scala }}' tlRelease
189243
190- build-docs :
191- name : Build docs
244+ coverage :
245+ name : Generate coverage report
192246 strategy :
193247 matrix :
194248 os : [ubuntu-latest]
@@ -227,19 +281,23 @@ jobs:
227281 ~/Library/Caches/Coursier/v1
228282 key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
229283
230- - run : sbt '++${{ matrix.scala }}' docs/mdoc
284+ - run : sbt '++${{ matrix.scala }}' coverage test coverageAggregate
231285
232- coverage :
233- name : Generate coverage report
286+ - run : ' bash <(curl -s https://codecov.io/bash)'
287+
288+ site :
289+ name : Generate Site
234290 strategy :
235291 matrix :
236292 os : [ubuntu-latest]
237293 scala : [2.13.8]
238- java : [temurin@11 ]
294+ java : [temurin@8 ]
239295 runs-on : ${{ matrix.os }}
240296 steps :
241- - name : Checkout current branch (fast )
297+ - name : Checkout current branch (full )
242298 uses : actions/checkout@v2
299+ with :
300+ fetch-depth : 0
243301
244302 - name : Download Java (temurin@8)
245303 id : download-java-temurin-8
@@ -269,55 +327,13 @@ jobs:
269327 ~/Library/Caches/Coursier/v1
270328 key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
271329
272- - run : sbt '++${{ matrix.scala }}' coverage test coverageAggregate
273-
274- - run : ' bash <(curl -s https://codecov.io/bash)'
275-
276- publish-site :
277- name : Publish site
278- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
279- strategy :
280- matrix :
281- os : [ubuntu-latest]
282- scala : [2.13.8]
283- java : [temurin@11]
284- runs-on : ${{ matrix.os }}
285- steps :
286- - name : Checkout current branch (fast)
287- uses : actions/checkout@v2
288-
289- - name : Download Java (temurin@11)
290- id : download-java-temurin-11
291- if : matrix.java == 'temurin@11'
292- uses : typelevel/download-java@v1
293- with :
294- distribution : temurin
295- java-version : 11
296-
297- - name : Setup Java (temurin@11)
298- if : matrix.java == 'temurin@11'
299- uses : actions/setup-java@v2
300- with :
301- distribution : jdkfile
302- java-version : 11
303- jdkFile : ${{ steps.download-java-temurin-11.outputs.jdkFile }}
304-
305- - name : Cache sbt
306- uses : actions/cache@v2
307- with :
308- path : |
309- ~/.sbt
310- ~/.ivy2/cache
311- ~/.coursier/cache/v1
312- ~/.cache/coursier/v1
313- ~/AppData/Local/Coursier/Cache/v1
314- ~/Library/Caches/Coursier/v1
315- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
316-
317- - run : sbt '++${{ matrix.scala }}' docs/makeSite
330+ - name : Generate site
331+ run : sbt '++${{ matrix.scala }}' docs/tlSite
318332
319- -
uses :
JamesIves/[email protected] 333+ - name : Publish site
334+ if : github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
335+ 320336 with :
321- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
322- BRANCH : gh-pages
323- FOLDER : docs/target/site
337+ github_token : ${{ secrets.GITHUB_TOKEN }}
338+ publish_dir : site/target/docs/site
339+ keep_files : true
0 commit comments