Skip to content

Commit

Permalink
Update default JDK to LTS 17
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jan 12, 2023
1 parent 330e561 commit 8e586af
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 54 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
scala: [2.12.15]
java: [temurin@11, graal_20.3.1@11]
java: [temurin@17, graal_20.3.1@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup GraalVM (graal_20.3.1@11)
if: matrix.java == 'graal_20.3.1@11'
- name: Setup GraalVM (graal_20.3.1@17)
if: matrix.java == 'graal_20.3.1@17'
uses: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 20.3.1
java: java11
java: java17

- name: Cache sbt
uses: actions/cache@v3
Expand Down Expand Up @@ -80,27 +80,27 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.17]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup GraalVM (graal_20.3.1@11)
if: matrix.java == 'graal_20.3.1@11'
- name: Setup GraalVM (graal_20.3.1@17)
if: matrix.java == 'graal_20.3.1@17'
uses: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 20.3.1
java: java11
java: java17

- name: Cache sbt
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Any and all settings which affect the behavior of the generative plugin should b
- `githubWorkflowBuildPreamble` : `Seq[WorkflowStep]` – Contains a list of steps which will be inserted into the `build` job in the **ci.yml** workflow *after* setup but *before* the `sbt test` invocation. Defaults to empty.
- `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.
- `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 properly configured with respect to the build matrix-selected Scala version.
- `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("17")`).
- `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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ThisBuild / crossScalaVersions := Seq("2.12.15")
// 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 += JavaSpec.graalvm("20.3.1", "11")
ThisBuild / githubWorkflowJavaVersions += JavaSpec.graalvm("20.3.1", "17")


ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
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 @@ -549,7 +549,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
githubWorkflowPublishTargetBranches := Seq(RefPredicate.Equals(Ref.Branch("main"))),
githubWorkflowPublishCond := None,

githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17")),
githubWorkflowScalaVersions := crossScalaVersions.value,
githubWorkflowOSes := Seq("ubuntu-latest"),
githubWorkflowDependencyPatterns := Seq("**/*.sbt", "project/build.properties"),
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 @@ -6,7 +6,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
24 changes: 12 additions & 12 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@17, graal_22.3.0@17]
test: [this, is]
include:
- test: this
Expand All @@ -39,18 +39,18 @@ jobs:
with:
fetch-depth: 0

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

- 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: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 21.1.0
graalvm: 22.3.0
java: java8

- name: Cache sbt
Expand Down Expand Up @@ -90,26 +90,26 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- 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: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 21.1.0
graalvm: 22.3.0
java: java8

- name: Cache sbt
Expand Down
12 changes: 6 additions & 6 deletions src/sbt-test/sbtghactions/no-clean/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6, 2.12.15]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down Expand Up @@ -73,16 +73,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down Expand Up @@ -72,16 +72,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down Expand Up @@ -89,16 +89,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down Expand Up @@ -74,16 +74,16 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@11]
java: [temurin@17]
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@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down

0 comments on commit 8e586af

Please sign in to comment.