Skip to content

Commit

Permalink
Merge pull request #755 from mzuehlke/setup-sbt
Browse files Browse the repository at this point in the history
use `sbt/setup-sbt` to install sbt on all platforms
  • Loading branch information
armanbilge authored Oct 10, 2024
2 parents 349760b + 044308e commit 06a10fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
shell: bash
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
Expand Down Expand Up @@ -254,8 +252,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
Expand Down Expand Up @@ -401,8 +398,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
Expand Down Expand Up @@ -544,8 +540,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,12 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
},
githubWorkflowGeneratedCacheSteps := Seq(),
githubWorkflowJobSetup := {
val brewInstallSbt =
List(
WorkflowStep
.Run(List("brew install sbt"), name = Some("Install sbt"), cond = macosGuard))
val installSbt = List(
WorkflowStep.Use(
UseRef.Public("sbt", "setup-sbt", "v1"),
name = Some("Install sbt")
)
)

val autoCrlfOpt = if (githubWorkflowOSes.value.exists(_.contains("windows"))) {
List(
Expand All @@ -796,7 +798,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
Nil
}

brewInstallSbt :::
installSbt :::
autoCrlfOpt :::
List(WorkflowStep.CheckoutFull) :::
WorkflowStep.SetupJava(githubWorkflowJavaVersions.value.toList) :::
Expand Down

0 comments on commit 06a10fd

Please sign in to comment.