Skip to content

Commit

Permalink
Add temurin@11 to head of githubWorkflowJavaVersions for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Mar 14, 2023
1 parent f4a164b commit ac79cdd
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 13 deletions.
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("17")`).
- `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"), 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 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@17])")
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, temurin@17])")
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("17")),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17")),
githubWorkflowScalaVersions := crossScalaVersions.value,
githubWorkflowOSes := Seq("ubuntu-latest"),
githubWorkflowDependencyPatterns := Seq("**/*.sbt", "project/build.properties"),
Expand Down
20 changes: 18 additions & 2 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@17, graal_22.3.0@17]
java: [temurin@11, temurin@17, graal_22.3.0@17]
test: [this, is]
include:
- test: this
Expand All @@ -41,6 +41,14 @@ jobs:
with:
fetch-depth: 0

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

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

Expand All @@ -94,6 +102,14 @@ jobs:
with:
fetch-depth: 0

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

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down
20 changes: 18 additions & 2 deletions src/sbt-test/sbtghactions/no-clean/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6, 2.12.15]
java: [temurin@17]
java: [temurin@11, 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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down Expand Up @@ -62,14 +70,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11]
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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11, 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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down Expand Up @@ -61,14 +69,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11]
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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@17]
java: [temurin@11, 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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down Expand Up @@ -78,14 +86,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.14]
java: [temurin@17]
java: [temurin@11]
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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down
20 changes: 18 additions & 2 deletions src/sbt-test/sbtghactions/suppressed-scala-version/expected-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11, 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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down Expand Up @@ -63,14 +71,22 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [temurin@17]
java: [temurin@11]
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'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
Expand Down

0 comments on commit ac79cdd

Please sign in to comment.