Skip to content

Commit

Permalink
Add support for Scala.js and Scala Native (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich authored Oct 7, 2022
1 parent dc84015 commit 42fec3a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: sbt ++${{ matrix.scala }} test

- name: Compress target directories
run: tar cf targets.tar joda/target/1-16-jvm-2.13 joda/target/1-16-jvm-3 core/target/1-13-jvm-2.11 core/target/1-15-jvm-2.13 joda/target/1-13-jvm-2.11 joda/target/1-13-jvm-2.12 core/target/1-13-jvm-2.12 core/target/1-15-jvm-2.12 joda/target/1-12-jvm-2.11 joda/target/1-15-jvm-3 joda/target/1-15-jvm-2.13 core/target/1-16-jvm-3 joda/target/1-14-jvm-2.13 target core/target/1-15-jvm-3 joda/target/1-14-jvm-2.12 core/target/1-14-jvm-2.11 core/target/1-16-jvm-2.13 joda/target/1-16-jvm-2.12 joda/target/1-15-jvm-2.12 core/target/1-16-jvm-2.12 core/target/1-14-jvm-2.12 joda/target/1-14-jvm-2.11 core/target/1-12-jvm-2.11 core/target/1-14-jvm-2.13 project/target
run: tar cf targets.tar joda/target/1-16-jvm-2.13 joda/target/1-16-jvm-3 core/target/1-13-jvm-2.11 core/target/1-15-jvm-2.13 core/target/1-16-js-3 joda/target/1-13-jvm-2.11 joda/target/1-13-jvm-2.12 core/target/1-16-native-2.13 core/target/1-16-native-3 core/target/1-13-jvm-2.12 core/target/1-15-jvm-2.12 joda/target/1-12-jvm-2.11 core/target/1-15-js-2.12 joda/target/1-15-jvm-3 joda/target/1-15-jvm-2.13 core/target/1-16-jvm-3 core/target/1-15-js-2.13 joda/target/1-14-jvm-2.13 target core/target/1-15-jvm-3 core/target/1-15-js-3 joda/target/1-14-jvm-2.12 core/target/1-16-js-2.12 core/target/1-15-native-3 core/target/1-14-jvm-2.11 core/target/1-16-jvm-2.13 joda/target/1-16-jvm-2.12 joda/target/1-15-jvm-2.12 core/target/1-16-js-2.13 core/target/1-16-jvm-2.12 core/target/1-14-jvm-2.12 joda/target/1-14-jvm-2.11 core/target/1-12-jvm-2.11 core/target/1-14-jvm-2.13 core/target/1-15-native-2.13 project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
Expand Down
32 changes: 32 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,38 @@ lazy val `core` = projectMatrix
ScalaCheckAxis.current.value.scalaTestPlusScalaCheck(scalaVersion.value)
)
)
.jsPlatform(
scalaVersions = Seq(Scala_2_12, Scala_2_13, Scala_3),
axisValues = Seq(ScalaCheckAxis.v1_15),
settings = Seq(
libraryDependencies +=
ScalaCheckAxis.current.value.scalaTestPlusScalaCheck(scalaVersion.value)
)
)
.jsPlatform(
scalaVersions = Seq(Scala_2_12, Scala_2_13, Scala_3),
axisValues = Seq(ScalaCheckAxis.v1_16),
settings = Seq(
libraryDependencies +=
ScalaCheckAxis.current.value.scalaTestPlusScalaCheck(scalaVersion.value)
)
)
.nativePlatform(
scalaVersions = Seq(Scala_2_13, Scala_3),
axisValues = Seq(ScalaCheckAxis.v1_15),
settings = Seq(
libraryDependencies +=
ScalaCheckAxis.current.value.scalaTestPlusScalaCheck(scalaVersion.value)
)
)
.nativePlatform(
scalaVersions = Seq(Scala_2_13, Scala_3),
axisValues = Seq(ScalaCheckAxis.v1_16),
settings = Seq(
libraryDependencies +=
ScalaCheckAxis.current.value.scalaTestPlusScalaCheck(scalaVersion.value)
)
)

lazy val `joda` = projectMatrix
.settings(commonSettings(subProject = Some("joda")))
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0-M4")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")

0 comments on commit 42fec3a

Please sign in to comment.