Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/scala/sbtghactions/WorkflowStep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ object WorkflowStep {
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
"cache" -> "sbt"))
case jv @ JavaSpec(JavaSpec.Distribution.GraalVM(Graalvm.Distribution(distribution)), version) =>
// Note: native-image is included by default in GraalVM for JDK 17+
// See: https://github.com/oracle/graal/pull/5995
WorkflowStep.Use(
Action.setupGraalvm,
name = Some(s"Setup GraalVM (${jv.render})"),
cond = Some(s"matrix.java == '${jv.render}'"),
params = ListMap(
"java-version" -> s"$version",
"distribution" -> distribution,
"components" -> "native-image",
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
"cache" -> "sbt"))
case jv @ JavaSpec(dist, version) =>
Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/sbtghactions/GenerativePluginSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,9 @@ class GenerativePluginSpec extends Specification {
javas = javas),
"")

results mustEqual s"""abc:
// Note: components: native-image is not included for Graalvm.Distribution
// because native-image is bundled by default in GraalVM for JDK 17+
results mustEqual s"""abc:
name: How to get to...
strategy:
matrix:
Expand All @@ -609,7 +611,6 @@ class GenerativePluginSpec extends Specification {
with:
java-version: 17
distribution: graalvm
components: native-image
github-token: $${{ secrets.GITHUB_TOKEN }}
cache: sbt"""
}
Expand Down
Loading