Skip to content

Commit

Permalink
fix: Release with JDK 8, #2994 (#2995)
Browse files Browse the repository at this point in the history
* Missing --release 8 in javacOptions
* Release must be with JDK 8 because --release 8 flag prevents access to
  com.sun.nio.file.SensitivityWatchEventModifier
  • Loading branch information
patriknw authored Aug 9, 2023
1 parent cc228bc commit 13e9db6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,32 @@ jobs:
- name: "Code style, compile tests, MiMa. Run locally with: sbt \"verifyCodeStyle; +Test/compile; mimaReportBinaryIssues\""
run: sbt "verifyCodeStyle; +Test/compile; mimaReportBinaryIssues"

compile-jdk-8:
name: Compile with JDK 8
runs-on: ubuntu-22.04
env:
JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8

steps:
- name: Checkout
uses: actions/[email protected]
with: # https://github.com/olafurpg/setup-scala#faster-checkout-of-big-repos
fetch-depth: 100

- name: Fetch tags
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*

- name: Set up JDK 8
uses: coursier/[email protected]
with:
jvm: adopt:1.8.0-275

- name: Cache Coursier cache
uses: coursier/[email protected]

- name: "Compile JDK 8"
run: sbt compile

documentation:
name: ScalaDoc, Documentation with Paradox
runs-on: ubuntu-22.04
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
- name: Cache Coursier cache
uses: coursier/[email protected]

- name: Set up JDK 11
# Release must be with JDK 8 because --release 8 flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier
- name: Set up JDK 8
uses: coursier/[email protected]
with:
jvm: temurin:1.11.0.17
jvm: adopt:1.8.0-275

- name: Publish artifacts for all Scala versions
env:
Expand Down
3 changes: 3 additions & 0 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ object Common extends AutoPlugin {
"-Xlint:try",
"-Xlint:unchecked",
"-Xlint:varargs"
// Release must be with JDK 8 because this flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier
// "--release",
// "8"
),
compile / javacOptions ++= (scalaVersion.value match {
case Dependencies.Scala213 if insideCI.value && fatalWarnings.value && !Dependencies.CronBuild =>
Expand Down

0 comments on commit 13e9db6

Please sign in to comment.