Skip to content

Commit

Permalink
Merge pull request #341 from http4s/0.23-to-scala3
Browse files Browse the repository at this point in the history
Merge 0.23 to 0.23-scala3
  • Loading branch information
froth authored Sep 5, 2023
2 parents ea43cfa + f434580 commit a0e79d2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 65 deletions.
85 changes: 27 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,96 +16,65 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


concurrency:
group: ${{ github.workflow }} @ ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
scala: [2.12.18]
java: [temurin@8, temurin@11, temurin@17, graalvm@17]
scala: [2.12]
java: [temurin@11, temurin@17, graalvm@17]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v2
with:
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)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v3
with:
distribution: jdkfile
distribution: temurin
java-version: 11
jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }}
cache: sbt

- 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: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: jdkfile
distribution: temurin
java-version: 17
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
cache: sbt

- 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: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Setup Java (graalvm@17)
id: setup-java-graalvm-17
if: matrix.java == 'graalvm@17'
uses: actions/setup-java@v3
uses: graalvm/setup-graalvm@v1
with:
distribution: jdkfile
distribution: graalvm
java-version: 17
jdkFile: ${{ steps.download-java-graalvm-17.outputs.jdkFile }}
cache: sbt

- name: Cache sbt
uses: actions/cache@v3
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: sbt update
if: matrix.java == 'graalvm@17' && steps.setup-java-graalvm-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Generate an http4s service on the ember backend with Circe.
2. Create your project:
- Scala 2: `sbt new http4s/http4s.g8`
- Scala 3: `sbt new http4s/http4s.g8 --branch 0.23-scala3`
- Java 8: `sbt new http4s/http4s.g8 --branch 0.23-java8`
3. `cd quickstart`
4. `sbt run`
5. `curl http://localhost:8080/hello/$USER`
Expand Down
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ 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 CirceVersion = "0.14.6"
val MunitVersion = "0.7.29"
val LogbackVersion = "1.4.11"
val MunitCatsEffectVersion = "1.0.7"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.3
sbt.version=1.9.4
2 changes: 1 addition & 1 deletion project/plugin.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8" % "0.16.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.4.22")
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.5.0")
2 changes: 1 addition & 1 deletion src/main/g8/build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val Http4sVersion = "0.23.23"
val CirceVersion = "0.14.5"
val CirceVersion = "0.14.6"
val MunitVersion = "0.7.29"
val LogbackVersion = "1.4.11"
val MunitCatsEffectVersion = "1.0.7"
Expand Down
3 changes: 1 addition & 2 deletions src/main/g8/project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
sbt.version=1.9.3

sbt.version=1.9.4

0 comments on commit a0e79d2

Please sign in to comment.