Skip to content

Commit a48cac0

Browse files
authored
Merge pull request #4621 from djspiewak/build/native-ci
Force LLVM 15
2 parents 045953e + 46980e2 commit a48cac0

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,14 @@ jobs:
301301
shell: bash
302302
run: sbt '++ ${{ matrix.scala }}' 'rootNative/scalafixAll --check'
303303

304-
- shell: bash
304+
- if: matrix.ci == 'ciNative' && matrix.os == 'ubuntu-22.04-arm'
305+
env:
306+
LLVM_BIN: /usr/lib/llvm-15/bin
307+
shell: bash
308+
run: sbt '++ ${{ matrix.scala }}' '${{ matrix.ci }}'
309+
310+
- if: matrix.ci != 'ciNative' || matrix.os != 'ubuntu-22.04-arm'
311+
shell: bash
305312
run: sbt '++ ${{ matrix.scala }}' '${{ matrix.ci }}'
306313

307314
- if: (matrix.scala == '2.13.18' || matrix.scala == '3.3.7') && matrix.ci == 'ciJVM' && matrix.java == 'temurin@17'

build.sbt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ val ArmOS = "ubuntu-22.04-arm"
114114
val Windows = "windows-latest"
115115
val MacOS = "macos-14"
116116

117+
val ScalaNativeLLVM = "/usr/lib/llvm-15/bin"
118+
val ArmNativeCI = s"matrix.ci == '${CI.Native.command}' && matrix.os == '$ArmOS'"
119+
val NonArmNativeCI = s"matrix.ci != '${CI.Native.command}' || matrix.os != '$ArmOS'"
120+
val ArmNativeEnv = Map("LLVM_BIN" -> ScalaNativeLLVM)
121+
117122
val Scala212 = "2.12.21"
118123
val Scala213 = "2.13.18"
119124
val Scala3 = "3.3.7"
@@ -178,7 +183,15 @@ ThisBuild / githubWorkflowBuild := Seq("JVM", "JS", "Native").map { platform =>
178183
) // windows has file lock issues due to shared sources
179184
)
180185
} ++ Seq(
181-
WorkflowStep.Sbt(List("${{ matrix.ci }}")),
186+
WorkflowStep.Sbt(
187+
List("${{ matrix.ci }}"),
188+
cond = Some(ArmNativeCI),
189+
env = ArmNativeEnv
190+
),
191+
WorkflowStep.Sbt(
192+
List("${{ matrix.ci }}"),
193+
cond = Some(NonArmNativeCI)
194+
),
182195
WorkflowStep.Sbt(
183196
List("docs/mdoc"),
184197
cond = Some(

0 commit comments

Comments
 (0)