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

Use macos-12 because JDK 8 and sbt not available on macos-latest anymore #42

Merged
merged 1 commit into from
May 13, 2024

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented May 13, 2024

  • macos-latest just recently got upgraded to use the macOS 14 Arm64 image.
    • You can see that recent change here, also GitHub announced that in their blog here.
  • Before macos-latest was referencing the macOS 12 x64 image.

This change however now causes two problems:

  1. The actions/setup-java@v4 can not install Java 8 anymore on this macOS Arm64 image, because there are no Temurin 8 JDK packages available, you can check that easily here (which in the background uses the same API to fetch the desired versions like actions/setup-java@v4 uses). Also, checking the Temurin™ Supported Platforms page under its section macOS (Apple Silicon) confirms that.

  2. Unfortunately, as of today, the GitHub Actions macOS 14 runner images (as well as the macOS 13 ones) do not provide sbt, see its README here. The macOS 12 runner images however did provide sbt, see here.

So the easiest thing to keep testing with Java 8 on macOS currently is to stay on macos-12 for now.

I did open requests to add sbt to the macOS 14 images (both Arm64 and x64), see

Once sbt is availabe for the macos-latest image, we could make use of it, but exclude Java8 on macOS from testing:

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 687632d..459b99c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,9 +22,12 @@ jobs:
     name: Build and Test
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-12]
+        os: [ubuntu-latest, macos-latest]
         scala: [2.12.19]
         java: [temurin@8, temurin@11, temurin@17, temurin@21]
+        exclude:
+          - java: temurin@8
+            os: macos-latest
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout current branch (full)
diff --git a/build.sbt b/build.sbt
index d807486..c3ae705 100644
--- a/build.sbt
+++ b/build.sbt
@@ -86,7 +86,7 @@ ThisBuild / githubWorkflowPublish := Seq(
   )
 )
 
-ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12")
+ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest")
 
 ThisBuild / githubWorkflowJavaVersions := Seq(
   JavaSpec.temurin("8"),
@@ -95,6 +95,9 @@ ThisBuild / githubWorkflowJavaVersions := Seq(
   JavaSpec.temurin("21")
 )
 
+ThisBuild / githubWorkflowBuildMatrixExclusions +=
+  MatrixExclude(Map("java" -> "temurin@8", "os" -> "macos-latest"))
+
 // Necessary to setup git so that sbt-scripted tests can run on github actions
 ThisBuild / githubWorkflowBuildPreamble := Seq(
   WorkflowStep.Run(

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants