Skip to content

Commit

Permalink
Add macos-latest to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed May 17, 2024
1 parent adc3fb4 commit 9bd3e9b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest, macos-12]
os: [ubuntu-latest, macos-12, macos-latest]
scala: [2.12.19, 2.13.13, 3.3.3]
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)
Expand Down Expand Up @@ -64,6 +67,10 @@ jobs:
java-version: 21
cache: sbt

- name: Install sbt
if: matrix.os == 'macos-latest'
run: brew install sbt

- name: Check that workflows are up to date
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck

Expand Down
16 changes: 15 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,25 @@ ThisBuild / githubWorkflowPublishTargetBranches :=
RefPredicate.Equals(Ref.Branch("main"))
)

ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12")
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12", "macos-latest")

ThisBuild / githubWorkflowJavaVersions := List(
JavaSpec.temurin("8"),
JavaSpec.temurin("11"),
JavaSpec.temurin("17"),
JavaSpec.temurin("21")
)

ThisBuild / githubWorkflowBuildMatrixExclusions +=
MatrixExclude(Map("java" -> "temurin@8", "os" -> "macos-latest"))

// GitHub Actions macOS 13+ runner images do not come with sbt preinstalled anymore
ThisBuild / githubWorkflowBuildPreamble ++= Seq(
WorkflowStep.Run(
commands = List(
"brew install sbt"
),
cond = Some("matrix.os == 'macos-latest'"),
name = Some("Install sbt")
)
)

0 comments on commit 9bd3e9b

Please sign in to comment.