Skip to content

Commit

Permalink
Merge pull request #139 from mkurz/macos-latest_no-sbt
Browse files Browse the repository at this point in the history
CI: Exclude `temurin@8`/`macos-latest` and manually install `sbt` on macOS
  • Loading branch information
mkurz authored May 15, 2024
2 parents db4f39a + ff0efea commit a7e459d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-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: Ignore line ending differences in git
Expand Down Expand Up @@ -77,6 +80,11 @@ jobs:
java-version: 21
cache: sbt

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

- name: Check that workflows are up to date
shell: bash
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
boot/
lib_managed/
target/
.bsp/

# Eclipse
.cache
Expand Down
13 changes: 13 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ ThisBuild / githubWorkflowJavaVersions := Seq(
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")
)
)

name := "sbt-osgi"
enablePlugins(SbtPlugin)
libraryDependencies ++= Dependencies.sbtOsgi
Expand Down

0 comments on commit a7e459d

Please sign in to comment.