Repository navigation
549 lines (488 loc) · 22.8 KB
/
Copy pathci.yaml
File metadata and controls
549 lines (488 loc) · 22.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
name: Scala 3
on:
push:
## Be careful if you add or remove something here! Quoting from
## <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore>:
##
## > If you define only tags/tags-ignore or only branches/branches-ignore, the
## > workflow won't run for events affecting the undefined Git ref. If you
## > define neither tags/tags-ignore or branches/branches-ignore, the workflow
## > will run for events affecting either branches or tags.
##
## We want the CI to run on both branches and tags, so we should either have:
## - both (tags or tags-ignore) and (branches or branches-ignore),
## - or neither of them.
## But it's important to not have only one or the other.
tags:
- '*'
branches-ignore:
- 'gh-readonly-queue/**'
- 'release-**'
- 'lts-**'
pull_request:
merge_group:
workflow_dispatch:
# Default token permissions for all jobs: read-only. Jobs that need more must
# declare their own permissions block.
permissions:
contents: read
# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag)
# For example it would:
# - terminate previous PR CI execution after pushing more changes to the same PR branch
# - terminate previous on-push CI run after merging new PR to main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
# Run tests before publishing a release
stdlib-tests:
uses: ./.github/workflows/stdlib.yaml
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
secrets: inherit
mima-tests:
uses: ./.github/workflows/mima.yaml
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
secrets: inherit
compiler-tests:
uses: ./.github/workflows/compiler-tests.yaml
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
secrets: inherit
community-build-tests:
uses: ./.github/workflows/community-build.yaml
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
secrets: inherit
misc-tests:
uses: ./.github/workflows/misc-tests.yaml
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
secrets: inherit
test_windows_full:
runs-on: windows-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'scala/scala3'
|| (
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.body, '[skip ci]')
&& contains(github.event.pull_request.body, '[test_windows_full]')
)"
steps:
- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 17
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'corretto'
check-latest: true
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@20cf087132cf939c160f0e53f87ba33634003e3e # v1.5.16
- name: Test
run: sbt ";scala3-bootstrapped/compile ;scala3-compiler-bootstrapped/test"
shell: cmd
publish_release:
permissions:
contents: write # for GH CLI to create a release
runs-on: ubuntu-latest
needs: [stdlib-tests, mima-tests, compiler-tests, community-build-tests, misc-tests, build-msi-package]
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
env:
RELEASEBUILD: yes
# IS_ORIGIN routes how we publish:
#
# - External channels like Maven Central are only used on scala/scala3.
# - On forks all the artifacts are built, signed and staged, but are only
# published to fork-local targets (GitHub releases, workflow artifacts).
#
# Setting the FORK_SIMULATE_ORIGIN repo variable lets a fork walk the
# origin code path to test that the external-publish guards fire.
IS_ORIGIN: ${{ github.repository == 'scala/scala3' || vars.FORK_SIMULATE_ORIGIN == 'true' }}
HAS_SIGNING_KEY: ${{ secrets.PGP_SECRET != '' }}
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
SCALA_PGP_FINGERPRINT: ${{ vars.SCALA_PGP_FINGERPRINT }}
SONATYPE_PW: ${{ secrets.SONATYPE_PW_ORGSCALALANG }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}
steps:
- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
##############################################################################################
## WARNING: DO NOT CHANGE THE JAVA VERSION HERE. SCALA 3.8.0+ IS DISTRIBUTED USING JAVA 17. ##
##############################################################################################
- name: Set up JDK 17
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'corretto'
check-latest: true
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@20cf087132cf939c160f0e53f87ba33634003e3e # v1.5.16
# Extract the release tag
- name: Extract the release tag
run : echo "RELEASE_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV
- name: Check compiler version
shell: bash
run : |
version=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
echo "This build version: ${version}"
echo "BUILD_VERSION=${version}" >> $GITHUB_ENV
if [ "${version}" != "${{ env.RELEASE_TAG }}" ]; then
echo "Compiler version for this build '${version}', does not match tag: ${{ env.RELEASE_TAG }}"
if [ "${IS_ORIGIN}" = "true" ]; then
exit 1
fi
echo "::warning::Continuing build, fork test tags may not match the built version"
fi
- name: Prepare the SDKs
shell: bash
run : |
prepareSDK() {
distroSuffix="$1"
sbtProject="$2"
distDir="$3"
# Build binaries
./project/scripts/sbt "all ${sbtProject}/Universal/packageBin ${sbtProject}/Universal/packageZipTarball"
artifactName="scala3-${{ env.RELEASE_TAG }}${distroSuffix}"
# sbt names the archives after the built version. On scala/scala3 the
# version check guarantees it equals the tag; on forks a test tag may
# differ, so rename the archives to the tag the release will use.
builtName="scala3-${{ env.BUILD_VERSION }}${distroSuffix}"
# Caluclate SHA for each of archive files
for ext in "zip" "tar.gz"; do
mv "${distDir}/target/universal/${builtName}.${ext}" "${artifactName}.${ext}"
sha256sum "${artifactName}.${ext}" > "${artifactName}.${ext}.sha256"
done
}
prepareSDK "" "dist" "./dist/"
prepareSDK "-aarch64-pc-linux" "dist-linux-aarch64" "./dist/linux-aarch64/"
prepareSDK "-x86_64-pc-linux" "dist-linux-x86_64" "./dist/linux-x86_64/"
prepareSDK "-aarch64-apple-darwin" "dist-mac-aarch64" "./dist/mac-aarch64/"
prepareSDK "-x86_64-apple-darwin" "dist-mac-x86_64" "./dist/mac-x86_64/"
prepareSDK "-x86_64-pc-win32" "dist-win-x86_64" "./dist/win-x86_64/"
- name: Download MSI package
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: scala.msi
path: .
- name: Prepare MSI package
shell: bash
run: |
msiInstaller="scala3-${{ env.RELEASE_TAG }}.msi"
mv scala.msi "${msiInstaller}"
sha256sum "${msiInstaller}" > "${msiInstaller}.sha256"
- name: Download deb package
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: scala.deb
path: .
- name: Prepare deb package
shell: bash
run: |
debInstaller="scala3-${{ env.RELEASE_TAG }}-x86_64-pc-linux.deb"
mv scala.deb "${debInstaller}"
sha256sum "${debInstaller}" > "${debInstaller}.sha256"
- name: Download rpm package
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: scala.rpm
path: .
- name: Prepare rpm package
shell: bash
run: |
rpmInstaller="scala3-${{ env.RELEASE_TAG }}-x86_64-pc-linux.rpm"
mv scala.rpm "${rpmInstaller}"
sha256sum "${rpmInstaller}" > "${rpmInstaller}.sha256"
- name: Install GH CLI
uses: dev-hanz-ops/install-gh-cli-action@6089bdde54118ad7ca3d22053eb2d69387fd2779 # v0.3.0
with:
gh-cli-version: 2.59.0
# Create the GitHub release
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
shell: bash
run: |
notesFile="./changelogs/${{ env.RELEASE_TAG }}.md"
notesArgs=(--notes-file "${notesFile}")
if [ "${IS_ORIGIN}" != "true" ] && [ ! -f "${notesFile}" ]; then
# Fork test tags have no changelog entry
notesArgs=(--generate-notes)
fi
gh release create \
--draft \
--title "${{ env.RELEASE_TAG }}" \
"${notesArgs[@]}" \
--latest=${{ !contains(env.RELEASE_TAG, '-RC') }} \
--prerelease=${{ contains(env.RELEASE_TAG, '-RC') }} \
--verify-tag ${{ env.RELEASE_TAG }} \
scala3-${{ env.RELEASE_TAG }}*.zip \
scala3-${{ env.RELEASE_TAG }}*.tar.gz \
scala3-${{ env.RELEASE_TAG }}*.deb \
scala3-${{ env.RELEASE_TAG }}*.rpm \
scala3-${{ env.RELEASE_TAG }}*.sha256 \
scala3-${{ env.RELEASE_TAG }}.msi
# Each namespace needs to be published separately
# On forks, the artifacts are signed and staged (target/sona-staging) but the
# upload to Maven Central is skipped and the staged bundle is archived instead.
# A fork without a signing key configured skips these steps entirely.
- name: Publish Release (org.scala-lang)
if: env.IS_ORIGIN == 'true' || env.HAS_SIGNING_KEY == 'true'
run: |
rm -rf ./target/sona-staging/
publishCommand=" \
all \
scala-library-bootstrapped/publishSigned \
scala3-compiler-bootstrapped/publishSigned \
scala3-directives-parser-bootstrapped/publishSigned \
scala3-interfaces/publishSigned \
scala3-library-bootstrapped/publishSigned \
scala3-library-sjs/publishSigned \
scala3-presentation-compiler/publishSigned \
scala3-repl/publishSigned \
scala3-sbt-bridge-bootstrapped/publishSigned \
scala3-staging/publishSigned \
scala3-tasty-inspector/publishSigned \
scaladoc/publishSigned \
tasty-core-bootstrapped/publishSigned \
"
if [ "${IS_ORIGIN}" = "true" ]; then
publishCommand="${publishCommand} ;sonaUpload"
fi
./project/scripts/sbtPublish "${publishCommand}"
- name: Upload staged bundle (org.scala-lang, fork only)
if: env.IS_ORIGIN != 'true' && env.HAS_SIGNING_KEY == 'true'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: sona-staging-org-scala-lang
path: target/sona-staging/
- name: Publish Release (org.scala-js)
if: env.IS_ORIGIN == 'true' || env.HAS_SIGNING_KEY == 'true'
run: |
# Ensure the staging does not contain any stale artifacts
rm -rf ./target/sona-staging/
publishCommand="scala-library-sjs/publishSigned"
if [ "${IS_ORIGIN}" = "true" ]; then
publishCommand="${publishCommand} ;sonaUpload"
fi
./project/scripts/sbtPublish "${publishCommand}"
- name: Upload staged bundle (org.scala-js, fork only)
if: env.IS_ORIGIN != 'true' && env.HAS_SIGNING_KEY == 'true'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: sona-staging-org-scala-js
path: target/sona-staging/
# Generates the SBOM of the release, published twice: as a plain SPDX 3
# document attached to the release, and as a signed attestation that the
# provenance job adds to the release's attestation bundle.
#
# The dependency data comes from sbt itself: sbt-dependency-submission's
# githubGenerateSnapshot resolves the build at the release commit and writes
# the GitHub dependency snapshot of it (the same data GitHub's dependency
# graph is made of, which only covers the default branch). unpack reads the
# snapshot into an SBOM whose root is the repository at the release tag and
# commit, with the modules of the build and their dependencies under it.
# Test and tool dependencies are left out.
sbom:
permissions:
contents: write # to attach the SBOM to the draft release
id-token: write # to sign the SBOM attestation with the job's workload identity
runs-on: ubuntu-latest
needs: [publish_release]
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
env:
RELEASE_TAG: ${{ github.ref_name }}
RELEASEBUILD: yes # resolve the build with the release versions, as publish_release does
steps:
- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK 17
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'corretto'
check-latest: true
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@20cf087132cf939c160f0e53f87ba33634003e3e # v1.5.16
# The dependency submission action would also submit the snapshot to
# GitHub, the plugin is loaded directly to only generate it. The plugin
# writes the snapshot path to the step outputs as snapshot-json-path.
- name: Generate the dependency snapshot
id: snapshot
shell: bash
run: |
echo 'addSbtPlugin("ch.epfl.scala" % "sbt-github-dependency-submission" % "3.2.3")' \
> project/github-dependency-submission.sbt
./project/scripts/sbt 'githubGenerateSnapshot {"ignoredModules":[],"ignoredConfigs":[],"onResolveFailure":"error","correlator":"release-sbom"}'
- name: Install unpack
uses: carabiner-dev/actions/install/unpack@63d43b57262e65927864c8f7ca0a6a8efe06acc0 # v1.3.1
with:
version: v0.3.3 # first release with the sbt decomposer
# The SBOM is generated once, signed into an attestation. The plain SBOM
# is read back out of it, so both copies carry the same document.
- name: Generate the SBOM
shell: bash
env:
SNAPSHOT: ${{ steps.snapshot.outputs.snapshot-json-path }}
run: |
unpack extract --sbt-snapshot "${SNAPSHOT}" --sign --format spdx3 sbt:. > sbom.bundle.json
jq -r '.dsseEnvelope.payload' sbom.bundle.json | base64 -d | jq '.predicate' \
> "scala3-${RELEASE_TAG}.spdx3.json"
- name: Attach the SBOM to the release
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
run: gh release upload "${RELEASE_TAG}" "scala3-${RELEASE_TAG}.spdx3.json" --clobber
- name: Upload the SBOM attestation
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: sbom-attestation
path: sbom.bundle.json
# Attests the artifacts published by publish_release with a signed SLSA
# provenance attestation and publishes it, along with the SBOM attestation,
# in the release's attestation bundle (attestations.intoto.jsonl).
#
# carabiner-dev/actions/slsa/generate uses Kubernetes' Tejolote attester
# observe this workflow run through the Actions API and builds the SLSA
# predicate from it. The attested subjects are the assets publish_release
# attached to the GitHub release. That release is still a draft at this point
# (not reachable through the API) so the assets are pulled using the github
# gh CLI, which does resolve drafts, and hashed from the local copy.
provenance:
permissions:
contents: write # to read the draft release assets and attach the attestation
id-token: write # to sign the attestation with the job's workload identity
actions: read # for tejolote to read the run and job metadata
runs-on: ubuntu-latest
needs: [publish_release, sbom]
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
env:
RELEASE_TAG: ${{ github.ref_name }}
steps:
- name: Download the released artifacts
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
run: |
mkdir -p release-artifacts
# Mirrors the asset list uploaded by publish_release. Naming the
# patterns also keeps a re-run from attesting an earlier attestation.
gh release download "${RELEASE_TAG}" \
--dir release-artifacts \
--pattern "scala3-${RELEASE_TAG}*.zip" \
--pattern "scala3-${RELEASE_TAG}*.tar.gz" \
--pattern "scala3-${RELEASE_TAG}*.sha256" \
--pattern "scala3-${RELEASE_TAG}.msi"
- name: Generate the provenance attestation
id: provenance
uses: carabiner-dev/actions/slsa/generate@63d43b57262e65927864c8f7ca0a6a8efe06acc0 # v1.3.1
with:
# publish_release has finished by the time this job starts, naming it
# keeps tejolote from waiting on the unrelated jobs of the run
watch-jobs: publish_release
artifacts: file://${{ github.workspace }}/release-artifacts
output: attestations.intoto.jsonl
- name: Download the SBOM attestation
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: sbom-attestation
path: sbom-attestation
# The bundle holds one signed attestation per line. tejolote and unpack
# both write their bundle as a single line of JSON, so the SBOM
# attestation is appended to the provenance as its own line.
- name: Attach the attestations to the release
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ATTESTATION: ${{ steps.provenance.outputs.attestation }}
run: |
# End the provenance line, unless it already is
[ -z "$(tail -c1 "${ATTESTATION}")" ] || echo >> "${ATTESTATION}"
cat sbom-attestation/sbom.bundle.json >> "${ATTESTATION}"
echo >> "${ATTESTATION}"
gh release upload "${RELEASE_TAG}" "${ATTESTATION}" --clobber
build-msi-package:
uses: ./.github/workflows/build-msi.yml
if :
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')) ||
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
test-msi-package:
uses: ./.github/workflows/test-msi.yml
needs: [build-msi-package]
with:
version: ${{ needs.build-msi-package.outputs.version }}
java-version: 17
build-deb-package:
uses: ./.github/workflows/build-deb.yml
if :
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_deb]')) ||
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
test-deb-package:
uses: ./.github/workflows/test-deb.yml
needs: [build-deb-package]
with:
version: ${{ needs.build-deb-package.outputs.version }}
build-rpm-package:
uses: ./.github/workflows/build-rpm.yml
if :
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_rpm]')) ||
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
test-rpm-package:
uses: ./.github/workflows/test-rpm.yml
needs: [build-rpm-package]
with:
version: ${{ needs.build-rpm-package.outputs.version }}
build-sdk-package:
uses: ./.github/workflows/build-sdk.yml
permissions:
contents: read
actions: read # to read back the win-x86_64 artifact through the Actions API
if:
(github.event_name == 'pull_request' && !contains(github.event.pull_request.body, '[skip ci]')) ||
(github.event_name == 'workflow_dispatch' && github.repository == 'scala/scala3') ||
(github.event_name == 'schedule' && github.repository == 'scala/scala3') ||
github.event_name == 'push' ||
github.event_name == 'merge_group'
with:
java-version: 17
build-chocolatey-package:
uses: ./.github/workflows/build-chocolatey.yml
needs: [ build-sdk-package ]
with:
version: 3.6.0-SNAPSHOT # Fake version, used only for choco tests
url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip
digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }}
test-chocolatey-package:
uses: ./.github/workflows/test-chocolatey.yml
permissions:
actions: read # downloads the launcher artifact through the Actions API
with:
version : 3.6.0-SNAPSHOT # Fake version, used only for choco tests
java-version: 17
if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]')
needs: [ build-chocolatey-package ]
scalafmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: coursier/cache-action@ee0650f98295f27a505e4bfd284c9bfaa913a465 # v9.0.1
- uses: VirtusLab/scala-cli-setup@9d61091a7d9d19f69faa59b31cdbc6ef2537eccc # v1.19.0
with:
jvm: corretto:17
- name: Check formatting
run: |
if ! scala-cli format --check; then
echo ""
echo "========================================"
echo "Formatting check failed!"
echo "To fix this, run the following command in the root of the project:"
echo ""
echo " scala-cli format"
echo ""
echo "Then commit the changes."
echo "========================================"
exit 1
fi