diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5be0318f..d14b237b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ on: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JABBA_INDEX: 'https://github.com/typelevel/jdk-index/raw/main/index.json' jobs: build: @@ -24,7 +23,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.15, 2.13.8, 3.0.2] - java: [adoptium@8, adoptium@11, adoptium@17] + java: [temurin@8, temurin@11, temurin@17] ci: [validateJS, validateJVM] runs-on: ${{ matrix.os }} steps: @@ -33,10 +32,26 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v13 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 11 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 17 - name: Cache sbt uses: actions/cache@v2 @@ -62,7 +77,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.15] - java: [adoptium@8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -70,10 +85,26 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v13 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 11 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 17 - name: Cache sbt uses: actions/cache@v2 @@ -105,7 +136,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.8] - java: [adoptium@8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -113,10 +144,26 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v13 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 11 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 17 - name: Cache sbt uses: actions/cache@v2 diff --git a/build.sbt b/build.sbt index 18def576..09e3add3 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ val algebraVersion = "2.7.0" val Scala212 = "2.12.15" val Scala213 = "2.13.8" val Scala3 = "3.0.2" -val Java8 = "adoptium@8" +val Java8 = JavaSpec.temurin("8") val CrossVersions = Seq(Scala212, Scala213, Scala3) lazy val buildSettings = Seq( @@ -19,9 +19,12 @@ lazy val buildSettings = Seq( ThisBuild / crossScalaVersions := Seq(Scala212, Scala213, Scala3) ThisBuild / scalaVersion := Scala212 -ThisBuild / githubWorkflowEnv += ("JABBA_INDEX" -> "https://github.com/typelevel/jdk-index/raw/main/index.json") ThisBuild / githubWorkflowPublishTargetBranches := Seq() -ThisBuild / githubWorkflowJavaVersions := Seq("adoptium@8", "adoptium@11", "adoptium@17") +ThisBuild / githubWorkflowJavaVersions := Seq( + JavaSpec.temurin("8"), + JavaSpec.temurin("11"), + JavaSpec.temurin("17") +) ThisBuild / githubWorkflowArtifactUpload := false ThisBuild / githubWorkflowBuildMatrixAdditions += "ci" -> List("validateJS", "validateJVM") diff --git a/project/plugins.sbt b/project/plugins.sbt index 3554ffa8..864110d6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,5 +9,5 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")