Skip to content

Commit

Permalink
Tweak ordering of install step
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Feb 22, 2024
1 parent 22ad467 commit b63356e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
shell: bash
run: brew install sbt

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
shell: bash
Expand Down Expand Up @@ -265,6 +270,10 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false
Expand Down Expand Up @@ -412,6 +421,10 @@ jobs:
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false
Expand Down Expand Up @@ -555,6 +568,10 @@ jobs:
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,26 +776,26 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
},
githubWorkflowGeneratedCacheSteps := Seq(),
githubWorkflowJobSetup := {
val autoCrlfOpt = if (githubWorkflowOSes.value.exists(_.contains("windows"))) {
val brewInstallSbtOpt = if (githubWorkflowOSes.value.exists(_.contains("macos"))) {
List(
WorkflowStep.Run(
List("git config --global core.autocrlf false"),
name = Some("Ignore line ending differences in git"),
cond = windowsGuard))
WorkflowStep
.Run(List("brew install sbt"), name = Some("Install sbt"), cond = macosGuard))
} else {
Nil
}

val brewInstallSbtOpt = if (githubWorkflowOSes.value.exists(_.contains("macos"))) {
val autoCrlfOpt = if (githubWorkflowOSes.value.exists(_.contains("windows"))) {
List(
WorkflowStep
.Run(List("brew install sbt"), name = Some("Install sbt"), cond = macosGuard))
WorkflowStep.Run(
List("git config --global core.autocrlf false"),
name = Some("Ignore line ending differences in git"),
cond = windowsGuard))
} else {
Nil
}

autoCrlfOpt :::
brewInstallSbtOpt :::
brewInstallSbtOpt :::
autoCrlfOpt :::
List(WorkflowStep.CheckoutFull) :::
WorkflowStep.SetupJava(githubWorkflowJavaVersions.value.toList) :::
githubWorkflowGeneratedCacheSteps.value.toList
Expand Down

0 comments on commit b63356e

Please sign in to comment.