-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '0.23' into 0.23-to-0.23-scala3
- Loading branch information
Showing
10 changed files
with
137 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,23 +21,82 @@ jobs: | |
name: Build and Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.14] | ||
java: [adopt@1.8, adopt@1.11, [email protected]] | ||
os: [ubuntu-latest, macos-latest] | ||
scala: [2.12.18] | ||
java: [temurin@8, temurin@11, temurin@17, graalvm@17] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v13 | ||
- name: Download Java (temurin@8) | ||
id: download-java-temurin-8 | ||
if: matrix.java == 'temurin@8' | ||
uses: typelevel/download-java@v2 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
java-version: 8 | ||
|
||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: jdkfile | ||
java-version: 8 | ||
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} | ||
|
||
- name: Download Java (temurin@11) | ||
id: download-java-temurin-11 | ||
if: matrix.java == 'temurin@11' | ||
uses: typelevel/download-java@v2 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Setup Java (temurin@11) | ||
if: matrix.java == 'temurin@11' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: jdkfile | ||
java-version: 11 | ||
jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} | ||
|
||
- name: Download Java (temurin@17) | ||
id: download-java-temurin-17 | ||
if: matrix.java == 'temurin@17' | ||
uses: typelevel/download-java@v2 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup Java (temurin@17) | ||
if: matrix.java == 'temurin@17' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: jdkfile | ||
java-version: 17 | ||
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} | ||
|
||
- name: Download Java (graalvm@17) | ||
id: download-java-graalvm-17 | ||
if: matrix.java == 'graalvm@17' | ||
uses: typelevel/download-java@v2 | ||
with: | ||
distribution: graalvm | ||
java-version: 17 | ||
|
||
- name: Setup Java (graalvm@17) | ||
if: matrix.java == 'graalvm@17' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: jdkfile | ||
java-version: 17 | ||
jdkFile: ${{ steps.download-java-graalvm-17.outputs.jdkFile }} | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.sbt | ||
|
@@ -49,7 +108,15 @@ jobs: | |
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Check that workflows are up to date | ||
run: sbt ++${{ matrix.scala }} githubWorkflowCheck | ||
run: sbt githubWorkflowCheck | ||
|
||
- name: Test generated template | ||
run: sbt ++${{ matrix.scala }} g8Test | ||
run: sbt '++ ${{ matrix.scala }}' g8Test | ||
|
||
- name: Build native assembly | ||
if: startsWith(matrix.java, 'graalvm') | ||
run: | | ||
cd target/sbt-test/http4s-g8/scripted | ||
sbt assembly | ||
gu install native-image | ||
cat native-image-readme.md | grep 'native-image -H*' | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,54 @@ | ||
// This build is for this Giter8 template. | ||
// To test the template run `g8` or `g8Test` from the sbt session. | ||
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details. | ||
// See https://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details. | ||
|
||
ThisBuild / githubWorkflowBuild := Seq( | ||
WorkflowStep.Sbt( | ||
List("g8Test"), | ||
name = Some("Test generated template") | ||
), | ||
WorkflowStep.Run( | ||
List( | ||
"cd target/sbt-test/http4s-g8/scripted", | ||
"sbt assembly", | ||
"gu install native-image", | ||
"cat native-image-readme.md | grep 'native-image -H*' | sh" | ||
), | ||
cond = Some("startsWith(matrix.java, 'graalvm')"), | ||
name = Some("Build native assembly") | ||
) | ||
) | ||
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]", "[email protected]", "[email protected]") | ||
|
||
val PrimaryOS = "ubuntu-latest" | ||
val MacOS = "macos-latest" | ||
ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, MacOS) | ||
ThisBuild / githubWorkflowJavaVersions := Seq( | ||
JavaSpec.temurin("8"), | ||
JavaSpec.temurin("11"), | ||
JavaSpec.temurin("17"), | ||
JavaSpec.graalvm("17") | ||
) | ||
ThisBuild / githubWorkflowPublishTargetBranches := Seq.empty | ||
|
||
val Http4sVersion = "0.23.23" | ||
val CirceVersion = "0.14.5" | ||
val MunitVersion = "0.7.29" | ||
val LogbackVersion = "1.4.9" | ||
val MunitCatsEffectVersion = "1.0.7" | ||
|
||
lazy val root = project.in(file(".")) | ||
.settings( | ||
name := "http4s-io-g8", | ||
name := "http4s-g8", | ||
libraryDependencies ++= Seq( | ||
"org.http4s" %% "http4s-ember-server" % Http4sVersion, | ||
"org.http4s" %% "http4s-ember-client" % Http4sVersion, | ||
"org.http4s" %% "http4s-circe" % Http4sVersion, | ||
"org.http4s" %% "http4s-dsl" % Http4sVersion, | ||
"io.circe" %% "circe-generic" % CirceVersion, | ||
"org.scalameta" %% "munit" % MunitVersion % Test, | ||
"org.typelevel" %% "munit-cats-effect-3" % MunitCatsEffectVersion % Test, | ||
"ch.qos.logback" % "logback-classic" % LogbackVersion % Runtime, | ||
), | ||
Test / test := { | ||
val _ = (Test / g8Test).toTask("").value | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.5.5 | ||
sbt.version=1.9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8" % "0.13.1") | ||
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0") | ||
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8" % "0.16.2") | ||
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.4.22") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
name = quickstart | ||
organization = com.example | ||
package = $organization$.$name;format="norm,word"$ | ||
|
||
# Use these after https://github.com/sbt/sbt-giter8-resolver/pull/8 | ||
#scala_version = maven(org.scala-lang, scala-library, stable) | ||
#sbt_version = maven(org.scala-sbt, sbt, stable) | ||
#http4s_version = maven(org.http4s, http4s-blaze-server_2.12, stable) | ||
#logback_version = maven(ch.qos.logback, logback-classic, stable) | ||
|
||
sbt_version = 1.9.0 | ||
http4s_version = 0.23.20 | ||
logback_version = 1.4.8 | ||
munit_version = 0.7.29 | ||
munit_cats_effect_version = 1.0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
sbt.version=$sbt_version$ | ||
sbt.version=1.9.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters