Skip to content

Commit

Permalink
Merge pull request #118 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
mdedetrich authored May 15, 2024
2 parents ceb417b + 766e407 commit 72d035e
Show file tree
Hide file tree
Showing 3 changed files with 23 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ project/plugins/project/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.bsp/
13 changes: 13 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,16 @@ ThisBuild / githubWorkflowJavaVersions := Seq(
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 72d035e

Please sign in to comment.