Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Scala 3 / Native job on macOS #440

Merged
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ jobs:
scala: [2.12.17, 2.13.10, 3.2.1]
java: [temurin@11]
project: [rootJS, rootJVM, rootNative]
include:
- scala: 3.2.1
java: temurin@11
project: rootNative
os: macos-latest
exclude:
- scala: 3.2.1
project: rootJVM
- scala: 3.2.1
project: rootNative
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand Down Expand Up @@ -224,16 +232,6 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.2.1, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1-rootNative

- name: Inflate target directories (3.2.1, rootNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
run: echo $PGP_SECRET | base64 -di | gpg --import
Expand Down
16 changes: 13 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ ThisBuild / crossScalaVersions := Seq("2.12.17", scala213, scala3)

ThisBuild / tlBaseVersion := "2.5"

ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
val temurin11 = JavaSpec.temurin("11")
ThisBuild / githubWorkflowJavaVersions := Seq(temurin11)

ThisBuild / githubWorkflowBuildMatrixExclusions += // TODO
MatrixExclude(Map("scala" -> scala3, "project" -> "rootJVM"))
ThisBuild / githubWorkflowBuildMatrixExclusions ++= Seq(
MatrixExclude(Map("scala" -> scala3, "project" -> "rootJVM")), // TODO
MatrixExclude(
Map("scala" -> scala3, "project" -> "rootNative", "os" -> "ubuntu-latest")
) // run on macOS instead
)

ThisBuild / githubWorkflowBuildMatrixInclusions +=
MatrixInclude(Map("scala" -> scala3, "java" -> temurin11.render, "project" -> "rootNative"),
Map("os" -> "macos-latest")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ufff, interesting, so native can only run on macos?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that on GHA, the free ubuntu runner only has 7 GB of RAM, but free macOS runner gets 14 GB of RAM. 7 GB just isn't enough for LLVM compiler I guess ...

)

val tzdbVersion = "2019c"
val scalajavaLocalesVersion = "1.5.1"
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.17")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.9")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.11")