Skip to content

Commit

Permalink
Merge pull request #4153 from mzuehlke/series-3.5x/graalvm21
Browse files Browse the repository at this point in the history
Update GraalVM from 17 to 21
  • Loading branch information
djspiewak authored Oct 25, 2024
2 parents cb76f95 + 65bdeb6 commit d241856
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 116 deletions.
91 changes: 1 addition & 90 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-12]
scala: [3.2.2, 2.12.17, 2.13.10]
java: [temurin@8, temurin@11, temurin@17, graalvm@17]
java: [temurin@8, temurin@11, temurin@17]
ci: [ciJVM, ciNative, ciJS, ciFirefox, ciChrome]
exclude:
- scala: 3.2.2
Expand All @@ -38,8 +38,6 @@ jobs:
java: temurin@11
- scala: 2.12.17
java: temurin@17
- scala: 2.12.17
java: graalvm@17
- os: windows-latest
scala: 3.2.2
- os: macos-12
Expand All @@ -60,8 +58,6 @@ jobs:
java: temurin@11
- ci: ciJS
java: temurin@17
- ci: ciJS
java: graalvm@17
- os: windows-latest
ci: ciJS
- os: macos-12
Expand All @@ -70,8 +66,6 @@ jobs:
java: temurin@11
- ci: ciFirefox
java: temurin@17
- ci: ciFirefox
java: graalvm@17
- os: windows-latest
ci: ciFirefox
- os: macos-12
Expand All @@ -80,8 +74,6 @@ jobs:
java: temurin@11
- ci: ciChrome
java: temurin@17
- ci: ciChrome
java: graalvm@17
- os: windows-latest
ci: ciChrome
- os: macos-12
Expand All @@ -90,8 +82,6 @@ jobs:
java: temurin@11
- ci: ciNative
java: temurin@17
- ci: ciNative
java: graalvm@17
- os: windows-latest
ci: ciNative
- os: macos-12
Expand All @@ -100,8 +90,6 @@ jobs:
- os: macos-12
ci: ciNative
scala: 3.2.2
- os: windows-latest
java: graalvm@17
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -184,29 +172,6 @@ jobs:
shell: bash
run: sbt '++ ${{ matrix.scala }}' reload +update

- 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)
id: 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 }}
cache: sbt

- name: sbt update
if: matrix.java == 'graalvm@17' && steps.setup-java-graalvm-17.outputs.cache-hit == 'false'
shell: bash
run: sbt '++ ${{ matrix.scala }}' reload +update

- name: Setup NodeJS v18 LTS
if: matrix.ci == 'ciJS'
uses: actions/setup-node@v3
Expand All @@ -218,11 +183,6 @@ jobs:
shell: bash
run: npm install

- name: Install GraalVM Native Image
if: matrix.java == 'graalvm@17'
shell: bash
run: gu install native-image

- name: Configure Windows Pagefile
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@d298bdee6b133626425040e3788f1055a8b4cf7a
Expand Down Expand Up @@ -267,11 +227,6 @@ jobs:
shell: bash
run: example/test-js.sh ${{ matrix.scala }}

- name: Test GraalVM Native Image
if: matrix.scala == '2.13.10' && matrix.java == 'graalvm@17' && matrix.os == 'ubuntu-latest'
shell: bash
run: sbt '++ ${{ matrix.scala }}' graalVMExample/nativeImage graalVMExample/nativeImageRun

- name: Test Example Native App Using Binary
if: matrix.ci == 'ciNative' && matrix.os == 'ubuntu-latest'
shell: bash
Expand Down Expand Up @@ -387,28 +342,6 @@ jobs:
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- 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)
id: 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 }}
cache: sbt

- name: sbt update
if: matrix.java == 'graalvm@17' && steps.setup-java-graalvm-17.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- name: Download target directories (3.2.2, ciJVM)
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -636,27 +569,5 @@ jobs:
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- 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)
id: 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 }}
cache: sbt

- name: sbt update
if: matrix.java == 'graalvm@17' && steps.setup-java-graalvm-17.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
39 changes: 13 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ val LTSJava = JavaSpec.temurin("11")
val LatestJava = JavaSpec.temurin("17")
val ScalaJSJava = OldGuardJava
val ScalaNativeJava = OldGuardJava
val GraalVM = JavaSpec.graalvm("17")

ThisBuild / githubWorkflowJavaVersions := Seq(OldGuardJava, LTSJava, LatestJava, GraalVM)
ThisBuild / githubWorkflowJavaVersions := Seq(OldGuardJava, LTSJava, LatestJava)
ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, Windows, MacOS)

ThisBuild / githubWorkflowBuildPreamble ++= Seq(
Expand All @@ -154,11 +153,6 @@ ThisBuild / githubWorkflowBuildPreamble ++= Seq(
name = Some("Install jsdom and source-map-support"),
cond = Some("matrix.ci == 'ciJS'")
),
WorkflowStep.Run(
List("gu install native-image"),
name = Some("Install GraalVM Native Image"),
cond = Some(s"matrix.java == '${GraalVM.render}'")
),
WorkflowStep.Use(
UseRef.Public(
"al-cheb",
Expand Down Expand Up @@ -194,12 +188,6 @@ ThisBuild / githubWorkflowBuild := Seq("JVM", "JS", "Native").map { platform =>
name = Some("Test Example JavaScript App Using Node"),
cond = Some(s"matrix.ci == 'ciJS' && matrix.os == '$PrimaryOS'")
),
WorkflowStep.Sbt(
List("graalVMExample/nativeImage", "graalVMExample/nativeImageRun"),
name = Some("Test GraalVM Native Image"),
cond = Some(
s"matrix.scala == '$Scala213' && matrix.java == '${GraalVM.render}' && matrix.os == '$PrimaryOS'")
),
WorkflowStep.Run(
List("example/test-native.sh ${{ matrix.scala }}"),
name = Some("Test Example Native App Using Binary"),
Expand Down Expand Up @@ -228,7 +216,7 @@ ThisBuild / githubWorkflowBuildMatrixExclusions := {
val scalaJavaFilters = for {
scala <- (ThisBuild / githubWorkflowScalaVersions).value.filterNot(Set(Scala213))
java <- (ThisBuild / githubWorkflowJavaVersions).value.filterNot(Set(OldGuardJava))
if !(scala == Scala3 && (java == LatestJava || java == GraalVM))
if !(scala == Scala3 && java == LatestJava)
} yield MatrixExclude(Map("scala" -> scala, "java" -> java.render))

val windowsAndMacScalaFilters =
Expand Down Expand Up @@ -270,12 +258,7 @@ ThisBuild / githubWorkflowBuildMatrixExclusions := {
)
}

// Nice-to-haves but unreliable in CI
val flakyFilters = Seq(
MatrixExclude(Map("os" -> Windows, "java" -> GraalVM.render))
)

scalaJavaFilters ++ windowsAndMacScalaFilters ++ jsScalaFilters ++ jsJavaAndOSFilters ++ nativeJavaAndOSFilters ++ flakyFilters
scalaJavaFilters ++ windowsAndMacScalaFilters ++ jsScalaFilters ++ jsJavaAndOSFilters ++ nativeJavaAndOSFilters
}

lazy val useJSEnv =
Expand Down Expand Up @@ -919,8 +902,8 @@ lazy val testsJVM = tests
)

/**
* Implementations of standard functionality (e.g. Semaphore, Console, Queue) purely in terms
* of the typeclasses, with no dependency on IO. In most cases, the *tests* for these
* Implementations of standard functionality (e.g. Semaphore, Console, Queue) purely in terms of
* the typeclasses, with no dependency on IO. In most cases, the *tests* for these
* implementations will require IO, and thus those tests will be located within the core
* project.
*/
Expand Down Expand Up @@ -997,10 +980,14 @@ lazy val std = crossProject(JSPlatform, JVMPlatform, NativePlatform)
ProblemFilters.exclude[MissingClassProblem](
"cats.effect.std.Dispatcher$Mode$Sequential$"),
// #4052, private classes
ProblemFilters.exclude[MissingTypesProblem]("cats.effect.std.Dispatcher$RegState$Unstarted$"),
ProblemFilters.exclude[DirectMissingMethodProblem]("cats.effect.std.Dispatcher#RegState#Unstarted.*"),
ProblemFilters.exclude[FinalMethodProblem]("cats.effect.std.Dispatcher#RegState#Unstarted.toString"),
ProblemFilters.exclude[DirectMissingMethodProblem]("cats.effect.std.Dispatcher#Registration#Primary.*"),
ProblemFilters.exclude[MissingTypesProblem](
"cats.effect.std.Dispatcher$RegState$Unstarted$"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"cats.effect.std.Dispatcher#RegState#Unstarted.*"),
ProblemFilters.exclude[FinalMethodProblem](
"cats.effect.std.Dispatcher#RegState#Unstarted.toString"),
ProblemFilters.exclude[DirectMissingMethodProblem](
"cats.effect.std.Dispatcher#Registration#Primary.*")
)
)
.jsSettings(
Expand Down

0 comments on commit d241856

Please sign in to comment.