Skip to content

Commit

Permalink
Switch to GHA Linux ARM runners
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jan 23, 2025
1 parent 50d0708 commit 58a194e
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 34 deletions.
24 changes: 0 additions & 24 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,3 @@ jvm_highcore_task:
script: sbt '++ 2.13' testsJVM/test ioAppTestsJVM/test
- name: JVM high-core-count 3
script: sbt '++ 3' testsJVM/test ioAppTestsJVM/test

jvm_arm_highcore_task:
only_if: $CIRRUS_TAG != '' || $CIRRUS_PR != ''
required_pr_labels: Cirrus JVM
arm_container:
image: sbtscala/scala-sbt:eclipse-temurin-jammy-17.0.5_8_1.9.0_3.3.0
cpu: 4
memory: 8G
matrix:
- name: JVM ARM high-core-count 2.13
script: sbt '++ 2.13' testsJVM/test ioAppTestsJVM/test
- name: JVM ARM high-core-count 3
script: sbt '++ 3' testsJVM/test ioAppTestsJVM/test

native_arm_task:
only_if: $CIRRUS_TAG != '' || $CIRRUS_PR != ''
required_pr_labels: Cirrus Native
arm_container:
dockerfile: .cirrus/Dockerfile
cpu: 2
memory: 8G
matrix:
- name: Native ARM 3
script: sbt '++ 3' testsNative/test ioAppTestsNative/test
49 changes: 48 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ jobs:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
os:
- ubuntu-latest
- ubuntu-24.04-arm
- windows-latest
- macos-14
scala: [3.3.4, 2.12.20, 2.13.15]
java:
- temurin@8
Expand Down Expand Up @@ -81,6 +85,8 @@ jobs:
java: temurin@21
- ci: ciJS
java: graalvm@21
- os: ubuntu-24.04-arm
ci: ciJS
- os: windows-latest
ci: ciJS
- os: macos-14
Expand All @@ -93,6 +99,8 @@ jobs:
java: temurin@21
- ci: ciFirefox
java: graalvm@21
- os: ubuntu-24.04-arm
ci: ciFirefox
- os: windows-latest
ci: ciFirefox
- os: macos-14
Expand All @@ -105,18 +113,57 @@ jobs:
java: temurin@21
- ci: ciChrome
java: graalvm@21
- os: ubuntu-24.04-arm
ci: ciChrome
- os: windows-latest
ci: ciChrome
- os: macos-14
ci: ciChrome
- ci: ciNative
java: temurin@11
os: ubuntu-latest
- ci: ciNative
java: temurin@11
os: ubuntu-24.04-arm
- ci: ciNative
java: temurin@11
os: windows-latest
- ci: ciNative
java: temurin@11
os: macos-14
- ci: ciNative
java: temurin@17
os: ubuntu-latest
- ci: ciNative
java: temurin@17
os: windows-latest
- ci: ciNative
java: temurin@21
os: ubuntu-latest
- ci: ciNative
java: temurin@21
os: ubuntu-24.04-arm
- ci: ciNative
java: temurin@21
os: windows-latest
- ci: ciNative
java: temurin@21
os: macos-14
- ci: ciNative
java: graalvm@21
os: ubuntu-latest
- ci: ciNative
java: graalvm@21
os: ubuntu-24.04-arm
- ci: ciNative
java: graalvm@21
os: windows-latest
- ci: ciNative
java: graalvm@21
os: macos-14
- os: ubuntu-24.04-arm
ci: ciNative
scala: 2.12.20
- os: windows-latest
ci: ciNative
- os: macos-14
Expand Down
31 changes: 22 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ ThisBuild / developers := List(
)

val PrimaryOS = "ubuntu-latest"
val ArmOS = "ubuntu-24.04-arm"
val Windows = "windows-latest"
val MacOS = "macos-14"

Expand Down Expand Up @@ -147,7 +148,7 @@ ThisBuild / githubWorkflowJavaVersions := Seq(
LatestJava,
LoomJava,
GraalVM)
ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, Windows, MacOS)
ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, ArmOS, Windows, MacOS)

ThisBuild / githubWorkflowBuildPreamble ++= Seq(
WorkflowStep.Use(
Expand Down Expand Up @@ -228,6 +229,11 @@ ThisBuild / githubWorkflowBuildMatrixExclusions := {
if !(scala == Scala3 && java == LatestJava)
} yield MatrixExclude(Map("scala" -> scala, "java" -> java.render))

val armFilters =
(ThisBuild / githubWorkflowJavaVersions).value.filterNot(Set(LatestJava)).map { java =>
MatrixExclude(Map("os" -> ArmOS, "java" -> java.render, "ci" -> CI.JVM.command))
}

val windowsAndMacScalaFilters =
(ThisBuild / githubWorkflowScalaVersions).value.filterNot(Set(Scala213)).flatMap { scala =>
Seq(
Expand All @@ -246,23 +252,30 @@ ThisBuild / githubWorkflowBuildMatrixExclusions := {
MatrixExclude(Map("ci" -> ci, "java" -> java.render))
}

javaFilters ++ Seq(
MatrixExclude(Map("os" -> Windows, "ci" -> ci)),
MatrixExclude(Map("os" -> MacOS, "ci" -> ci)))
val osFilters =
(ThisBuild / githubWorkflowOSes).value.tail.map { os =>
MatrixExclude(Map("os" -> os, "ci" -> ci))
}

javaFilters ++ osFilters
}

val nativeJavaAndOSFilters = {
val ci = CI.Native.command

val javaFilters =
(ThisBuild / githubWorkflowJavaVersions).value.filterNot(Set(ScalaNativeJava)).map {
java => MatrixExclude(Map("ci" -> ci, "java" -> java.render))
}
val javaFilters = for {
java <- (ThisBuild / githubWorkflowJavaVersions).value.filterNot(Set(ScalaNativeJava))
os <- (ThisBuild / githubWorkflowOSes).value
if !(Set(ArmOS, MacOS).contains(os) && java == LatestJava)
} yield MatrixExclude(Map("ci" -> ci, "java" -> java.render, "os" -> os))

javaFilters ++ Seq(
val osFilters = Seq(
MatrixExclude(Map("os" -> ArmOS, "ci" -> ci, "scala" -> Scala212)),
MatrixExclude(Map("os" -> Windows, "ci" -> ci)),
MatrixExclude(Map("os" -> MacOS, "ci" -> ci, "scala" -> Scala212))
)

javaFilters ++ osFilters
}

scalaJavaFilters ++ windowsAndMacScalaFilters ++ jsScalaFilters ++ jsJavaAndOSFilters ++ nativeJavaAndOSFilters
Expand Down

0 comments on commit 58a194e

Please sign in to comment.