Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servlet 4 support #22

Merged
merged 2 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 7 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 3.1.2]
java: [temurin@8, temurin@11, temurin@17]
java: [temurin@11, temurin@17]
project: [rootJVM]
exclude:
- scala: 3.1.2
java: temurin@11
- scala: 3.1.2
java: temurin@17
runs-on: ${{ matrix.os }}
Expand All @@ -44,22 +42,6 @@ jobs:
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
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'
Expand Down Expand Up @@ -108,22 +90,22 @@ jobs:
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck

- name: Check headers and formatting
if: matrix.java == 'temurin@8'
if: matrix.java == 'temurin@11'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck

- name: Test
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test

- name: Check binary compatibility
if: matrix.java == 'temurin@8'
if: matrix.java == 'temurin@11'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@8'
if: matrix.java == 'temurin@11'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc

- name: Check unused compile dependencies
if: matrix.java == 'temurin@8'
if: matrix.java == 'temurin@11'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' unusedCompileDependenciesTest

- name: Make target directories
Expand All @@ -149,30 +131,14 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.8]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
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'
Expand Down Expand Up @@ -237,16 +203,6 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13.8, rootJVM)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM

- name: Inflate target directories (2.13.8, rootJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.1.2, rootJVM)
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -277,30 +233,14 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.8]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
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'
Expand Down
8 changes: 6 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ val Scala213 = "2.13.8"
ThisBuild / crossScalaVersions := Seq(Scala213, "3.1.2")
ThisBuild / scalaVersion := Scala213 // the default Scala

// Jetty 10+, for testing, requires Java 11.
ThisBuild / githubWorkflowJavaVersions -= JavaSpec.temurin("8")
ThisBuild / tlJdkRelease := Some(8)

lazy val root = tlCrossRootProject.aggregate(servlet, examples)

val asyncHttpClientVersion = "2.12.3"
val jettyVersion = "9.4.46.v20220331"
val jettyVersion = "10.0.9"
val http4sVersion = "0.23.12"
val munitCatsEffectVersion = "1.0.7"
val servletApiVersion = "3.1.0"
val servletApiVersion = "4.0.1"

lazy val servlet = project
.in(file("servlet"))
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
imports = [ typelevel-nix.typelevelShell ];
name = "http4s-servlet-shell";
typelevelShell = {
jdk.package = pkgs.jdk8;
jdk.package = pkgs.jdk11;
nodejs.enable = true;
};
};
Expand Down