Skip to content

Commit

Permalink
Merge pull request #95 from slick/build-on-java-11
Browse files Browse the repository at this point in the history
Build on Java 11
  • Loading branch information
nafg authored Sep 29, 2024
2 parents 6be7db2 + 820848a commit e1adc9f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.19]
java: [zulu@8]
java: [zulu@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (zulu@8)
if: matrix.java == 'zulu@8'
- name: Setup Java (zulu@11)
if: matrix.java == 'zulu@11'
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
java-version: 11
cache: sbt

- name: Setup sbt
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pull_request_rules:
- author=scala-steward
- author=slick-scala-steward[bot]
- author=renovate[bot]
- check-success=Build and Test (ubuntu-latest, 2.12.19, zulu@8)
- check-success=Build and Test (ubuntu-latest, 2.12.19, zulu@11)
actions:
queue:
name: default
23 changes: 13 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _root_.io.github.nafg.mergify.dsl._
import _root_.io.github.nafg.mergify.dsl.*

libraryDependencies ++= List(
"org.slf4j" % "slf4j-nop" % "2.0.16",
Expand All @@ -20,20 +20,23 @@ mergifyExtraConditions := Seq(
lazy val runAll = taskKey[Unit]("Run all main classes")

def runAllIn(config: Configuration) = Def.task {
val s = streams.value
val cp = (config / fullClasspath).value
val r = (config / run / runner).value
val classes = (config / discoveredMainClasses).value
classes.foreach { className =>
r.run(className, cp.files, Seq(), s.log).get
}
val s = streams.value
val cp = (config / fullClasspath).value
val r = (config / run / runner).value
val classes = (config / discoveredMainClasses).value
classes.foreach { className =>
r.run(className, cp.files, Seq(), s.log).get
}
}

runAll := {
runAllIn(Compile).value
runAllIn(Test).value
}

ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(List("runAll"), name = Some(s"Run all main classes"))

ThisBuild / githubWorkflowPublishTargetBranches := Seq()
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.zulu("11"))
ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(
List("runAll"),
name = Some(s"Run all main classes")
)

0 comments on commit e1adc9f

Please sign in to comment.