File tree Expand file tree Collapse file tree
src/main/scala/sbtghactions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 matrix :
2525 os : [ubuntu-latest, macos-latest, windows-latest]
2626 scala : [2.12.18]
27- java : [temurin@8, graal_graalvm@17]
27+ java : [temurin@8, graal_graalvm@17, corretto@17 ]
2828 runs-on : ${{ matrix.os }}
2929 steps :
3030 - name : Ignore line ending differences in git
6262 github-token : ${{ secrets.GITHUB_TOKEN }}
6363 cache : sbt
6464
65+ - name : Setup Java (corretto@17)
66+ if : matrix.java == 'corretto@17'
67+ uses : actions/setup-java@v4
68+ with :
69+ distribution : corretto
70+ java-version : 17
71+ cache : sbt
72+
6573 - name : Check that workflows are up to date
6674 shell : bash
6775 run : sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
@@ -124,6 +132,14 @@ jobs:
124132 github-token : ${{ secrets.GITHUB_TOKEN }}
125133 cache : sbt
126134
135+ - name : Setup Java (corretto@17)
136+ if : matrix.java == 'corretto@17'
137+ uses : actions/setup-java@v4
138+ with :
139+ distribution : corretto
140+ java-version : 17
141+ cache : sbt
142+
127143 - name : Download target directories (2.12.18)
128144 uses : actions/download-artifact@v4
129145 with :
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ ThisBuild / scalaVersion := scala212
2323
2424ThisBuild / githubWorkflowOSes := Seq (" ubuntu-latest" , " macos-latest" , " windows-latest" )
2525ThisBuild / githubWorkflowBuild := Seq (WorkflowStep .Sbt (List (" test" , " scripted" )))
26- ThisBuild / githubWorkflowJavaVersions += JavaSpec .graalvm(Graalvm .Distribution (" graalvm" ), " 17" )
26+ ThisBuild / githubWorkflowJavaVersions ++= Seq (
27+ JavaSpec .graalvm(Graalvm .Distribution (" graalvm" ), " 17" ),
28+ JavaSpec .corretto(" 17" )
29+ )
2730
2831ThisBuild / githubWorkflowTargetTags ++= Seq (" v*" )
2932ThisBuild / githubWorkflowPublishTargetBranches :=
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ object JavaSpec {
5454
5555 def temurin (version : String ): JavaSpec = JavaSpec (Distribution .Temurin , version)
5656
57+ def corretto (version : String ): JavaSpec = JavaSpec (Distribution .Corretto , version)
58+
5759 private [sbtghactions] object JavaVersionExtractor {
5860 def unapply (version : String ): Option [Int ] =
5961 version.split(" \\ ." ).headOption.map(_.toInt)
@@ -83,6 +85,7 @@ object JavaSpec {
8385 case object Adopt extends Distribution (" adopt-hotspot" )
8486 case object OpenJ9 extends Distribution (" adopt-openj9" )
8587 case object Liberica extends Distribution (" liberica" )
88+ case object Corretto extends Distribution (" corretto" )
8689 final case class GraalVM (graalvm : Graalvm ) extends Distribution (graalvm.compile)
8790 }
8891}
You can’t perform that action at this time.
0 commit comments