Skip to content

Commit

Permalink
add sbt 2 cross build setting
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Dec 21, 2024
1 parent 84e74ec commit f6c20f5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck

- shell: bash
run: sbt '++ ${{ matrix.scala }}' test scripted
run: sbt '++ ${{ matrix.scala }}' '+ test' scripted

- name: Compress target directories
shell: bash
Expand Down
21 changes: 18 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ThisBuild / crossScalaVersions := Seq(scala212)
ThisBuild / scalaVersion := scala212

ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest")
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("+ test", "scripted")))
ThisBuild / githubWorkflowJavaVersions ++= Seq(
JavaSpec.graalvm(Graalvm.Distribution("graalvm"), "17"),
JavaSpec.corretto("17")
Expand Down Expand Up @@ -64,7 +64,15 @@ ThisBuild / dynver := {
}

sbtPlugin := true
pluginCrossBuild / sbtVersion := "1.5.5"
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" =>
"1.5.5"
case _ =>
"2.0.0-M3"
}
}
crossScalaVersions += "3.6.2"

publishMavenStyle := true

Expand All @@ -79,7 +87,14 @@ scriptedLaunchOpts ++= Seq("-Dplugin.version=" + version.value)
scriptedBufferLog := true
// This sbt version is necessary for CI to work on windows with
// scripted tests, see https://github.com/sbt/sbt/pull/7087
scriptedSbt := "1.10.2"
scriptedSbt := {
scalaBinaryVersion.value match {
case "2.12" =>
"1.10.2"
case _ =>
scriptedSbt.value
}
}

ThisBuild / homepage := Some(url("https://github.com/sbt/sbt-github-actions"))
ThisBuild / startYear := Some(2020)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtghactions/GenerativePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package sbtghactions

import sbt.Keys._
import sbt._
import sbt.{given, _}

import java.nio.file.FileSystems
import scala.concurrent.duration.FiniteDuration
Expand Down

0 comments on commit f6c20f5

Please sign in to comment.