Skip to content

Commit

Permalink
Revert default JDK to 8 and GraalVM to 22.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Mar 21, 2023
1 parent ba5bcc8 commit 3051f2c
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 95 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
scala: [2.12.15]
java: [temurin@8, graal_20.3.1@11]
java: [temurin@8, graal_22.3.0@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -40,12 +40,12 @@ jobs:
java-version: 8
cache: sbt

- name: Setup GraalVM (graal_20.3.1@11)
if: matrix.java == 'graal_20.3.1@11'
- name: Setup GraalVM (graal_22.3.0@17)
if: matrix.java == 'graal_22.3.0@17'
uses: graalvm/setup-graalvm@v1
with:
version: 20.3.1
java-version: 11
version: 22.3.0
java-version: 17
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: sbt
Expand Down Expand Up @@ -88,12 +88,12 @@ jobs:
java-version: 8
cache: sbt

- name: Setup GraalVM (graal_20.3.1@11)
if: matrix.java == 'graal_20.3.1@11'
- name: Setup GraalVM (graal_22.3.0@17)
if: matrix.java == 'graal_22.3.0@17'
uses: graalvm/setup-graalvm@v1
with:
version: 20.3.1
java-version: 11
version: 22.3.0
java-version: 17
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: sbt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Any and all settings which affect the behavior of the generative plugin should b
- `githubWorkflowBuildPostamble` : `Seq[WorkflowStep]` – Similar to the `Preamble` variant, this contains a list of steps which will be added to the `build` job *after* the `sbt test` invocation but before cleanup. Defaults to empty.
- `githubWorkflowBuildSbtStepPreamble` : `Seq[String]` - See below.
- `githubWorkflowBuild` : `Seq[WorkflowStep]` – The steps which invoke sbt (or whatever else you want) to build and test your project. This defaults to just `[sbt test]`, but can be overridden to anything. For example, sbt plugin projects probably want to redefine this to be `Seq(WorkflowStep.Sbt(List("test", "scripted")))`, which would run the `test` and `scripted` sbt tasks, in order. Note that all uses of `WorkflowStep.Sbt` are compiled using the configured `githubWorkflowSbtCommand` invocation, and prepended with `githubWorkflowBuildSbtStepPreamble` (default: `[++{matrix.scala}]`).
- `githubWorkflowJavaVersions` : `Seq[JavaSpec]` – A list of Java versions to be used for the build job. The publish job will use the *first* of these versions. Defaults to `JavaSpec.temurin("11")`).
- `githubWorkflowJavaVersions` : `Seq[JavaSpec]` – A list of Java versions to be used for the build job. The publish job will use the *first* of these versions. Defaults to `JavaSpec.temurin("8")`).
- `githubWorkflowScalaVersions` : `Seq[String]` – A list of Scala versions which will be used to `build` your project. Defaults to `crossScalaVersions` in `build`, and simply `scalaVersion` in `publish`.
- `githubWorkflowOSes` : `Seq[String]` – A list of operating systems, which will be ultimately passed to [the `runs-on:` directive](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on), on which to `build` your project. Defaults to `ubuntu-latest`. Note that, regardless of the value of this setting, only `ubuntu-latest` will be used for the `publish` job. This setting only affects `build`.
- `githubWorkflowBuildRunsOnExtraLabels` : `Seq[String]` - A list of additional runs-on labels, which will be combined with the matrix.os from `githubWorkflowOSes` above allowing for singling out more specific runners.
Expand Down
6 changes: 1 addition & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ ThisBuild / scalaVersion := scala212
// Add windows-latest when https://github.com/sbt/sbt/issues/7082 is resolved
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest")
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
ThisBuild / githubWorkflowJavaVersions :=
Seq(
JavaSpec.temurin("8"),
JavaSpec.graalvm("20.3.1", "11"),
)
ThisBuild / githubWorkflowJavaVersions += JavaSpec.graalvm("22.3.0", "17")

ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtghactions/GenerativeKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ trait GenerativeKeys {
lazy val githubWorkflowPublishCond = settingKey[Option[String]]("A set of conditionals to apply to the publish job to further restrict its run (default: [])")
lazy val githubWorkflowPublishTimeout = settingKey[Option[FiniteDuration]]("The maximum duration to let the publish job run before GitHub automatically cancels it. (default: None)")

lazy val githubWorkflowJavaVersions = settingKey[Seq[JavaSpec]]("A list of Java versions to be used for the build job. The publish job will use the *first* of these versions. (default: [temurin@11])")
lazy val githubWorkflowJavaVersions = settingKey[Seq[JavaSpec]]("A list of Java versions to be used for the build job. The publish job will use the *first* of these versions. (default: [temurin@8])")
lazy val githubWorkflowScalaVersions = settingKey[Seq[String]]("A list of Scala versions on which to build the project (default: crossScalaVersions.value)")
lazy val githubWorkflowOSes = settingKey[Seq[String]]("A list of OS names (default: [ubuntu-latest])")

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 @@ -564,7 +564,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
githubWorkflowPublishCond := None,
githubWorkflowPublishTimeout := None,

githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8")),
githubWorkflowScalaVersions := crossScalaVersions.value,
githubWorkflowOSes := Seq("ubuntu-latest"),
githubWorkflowDependencyPatterns := Seq("**/*.sbt", "project/build.properties"),
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtghactions/WorkflowJob.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final case class WorkflowJob(
env: Map[String, String] = Map(),
oses: List[String] = List("ubuntu-latest"),
scalas: List[String] = List("2.13.6"),
javas: List[JavaSpec] = List(JavaSpec.temurin("11")),
javas: List[JavaSpec] = List(JavaSpec.temurin("8")),
needs: List[String] = List(),
matrixFailFast: Option[Boolean] = None,
matrixAdds: Map[String, List[String]] = Map(),
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbtghactions/check-and-regenerate/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ThisBuild / scalaVersion := crossScalaVersions.value.head

ThisBuild / githubWorkflowTargetTags += "v*"

ThisBuild / githubWorkflowJavaVersions += JavaSpec.graalvm("21.1.0", "8")
ThisBuild / githubWorkflowJavaVersions += JavaSpec.graalvm("22.3.0", "17")
ThisBuild / githubWorkflowPublishTargetBranches += RefPredicate.Equals(Ref.Tag("test"))

ThisBuild / githubWorkflowBuildMatrixAdditions += "test" -> List("this", "is")
Expand Down
32 changes: 16 additions & 16 deletions src/sbt-test/sbtghactions/check-and-regenerate/expected-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6, 2.12.15]
java: [temurin@11, graal_21.1.0@8]
java: [temurin@8, graal_22.3.0@17]
test: [this, is]
include:
- test: this
Expand All @@ -41,20 +41,20 @@ jobs:
with:
fetch-depth: 0

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

- name: Setup GraalVM (graal_21.1.0@8)
if: matrix.java == 'graal_21.1.0@8'
- name: Setup GraalVM (graal_22.3.0@17)
if: matrix.java == 'graal_22.3.0@17'
uses: graalvm/setup-graalvm@v1
with:
version: 21.1.0
java-version: 8
version: 22.3.0
java-version: 17
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: sbt
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

Expand All @@ -94,20 +94,20 @@ jobs:
with:
fetch-depth: 0

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

- name: Setup GraalVM (graal_21.1.0@8)
if: matrix.java == 'graal_21.1.0@8'
- name: Setup GraalVM (graal_22.3.0@17)
if: matrix.java == 'graal_22.3.0@17'
uses: graalvm/setup-graalvm@v1
with:
version: 21.1.0
java-version: 8
version: 22.3.0
java-version: 17
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: sbt
Expand Down
16 changes: 8 additions & 8 deletions src/sbt-test/sbtghactions/no-clean/.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.13.6, 2.12.15]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Check that workflows are up to date
Expand All @@ -62,20 +62,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Download target directories (2.13.6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Check that workflows are up to date
Expand All @@ -61,20 +61,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Download target directories (2.13.6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Check that workflows are up to date
Expand Down Expand Up @@ -78,20 +78,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Download target directories (2.12.14)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Check that workflows are up to date
Expand All @@ -63,20 +63,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Download target directories (2.13.6)
Expand Down
Loading

0 comments on commit 3051f2c

Please sign in to comment.