Skip to content

Commit

Permalink
drop Scala Native 0.3.9 and Scala 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrh committed Jan 21, 2021
1 parent 83a8710 commit 4e4b898
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 43 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.0.0-M2, 3.0.0-M3, 2.11.12, 2.12.13, 2.13.3]
scala: [3.0.0-M2, 3.0.0-M3, 2.12.13, 2.13.4]
java: [[email protected], [email protected]]
platform: [jvm]
workers: [1, 4]
Expand All @@ -45,20 +45,18 @@ jobs:
- workers: 1
os: ubuntu-latest
java: [email protected]
scala: 2.13.3
scala: 2.13.4
platform: js
- workers: 1
os: ubuntu-latest
java: [email protected]
scala: 2.11.12
scala: 2.12.13
platform: native
pluginversion: 0.3.9
- workers: 1
os: ubuntu-latest
java: [email protected]
scala: 2.11.12
scala: 2.13.4
platform: native
pluginversion: 0.4.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand Down Expand Up @@ -93,7 +91,6 @@ jobs:
- name: Run the build script
env:
PLATFORM: ${{ matrix.platform }}
PLUGIN_VERSION: ${{ matrix.pluginversion }}
TRAVIS_SCALA_VERSION: ${{ matrix.scala }}
WORKERS: ${{ matrix.workers }}
run: ./tools/travis-script.sh
Expand All @@ -103,7 +100,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.3]
scala: [2.13.4]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -139,7 +136,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.0.0-M2, 3.0.0-M3, 2.11.12, 2.12.13, 2.13.3]
scala: [3.0.0-M2, 3.0.0-M3, 2.12.13, 2.13.4]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down
32 changes: 12 additions & 20 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ val scalaMajorVersion = SettingKey[Int]("scalaMajorVersion")

scalaVersionSettings

val Scala211 = "2.11.12"
val Scala212 = "2.12.13"
val Scala213 = "2.13.3"
val Scala213 = "2.13.4"
val DottyOld = "3.0.0-M2"
val DottyNew = "3.0.0-M3"

ThisBuild / crossScalaVersions := Seq(DottyOld, DottyNew, Scala211, Scala212, Scala213)
ThisBuild / crossScalaVersions := Seq(DottyOld, DottyNew, Scala212, Scala213)
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last

ThisBuild / githubWorkflowPublishTargetBranches := Seq()
Expand All @@ -29,20 +28,20 @@ ThisBuild / githubWorkflowBuildMatrixAdditions += "platform" -> List("jvm")
ThisBuild / githubWorkflowBuildMatrixAdditions += "workers" -> List("1", "4")

ThisBuild / githubWorkflowBuildMatrixInclusions ++=
crossScalaVersions.value.filterNot(Set(Scala211)) map { scala =>
crossScalaVersions.value map { scala =>
MatrixInclude(
Map("os" -> PrimaryOS, "java" -> Java8, "scala" -> scala),
Map("platform" -> "js", "workers" -> "1"))
}

ThisBuild / githubWorkflowBuildMatrixInclusions ++=
Seq("0.3.9", "0.4.0") map { v =>
crossScalaVersions.value.filter(_.startsWith("2.")) map { scala =>
MatrixInclude(
Map(
"os" -> PrimaryOS,
"scala" -> Scala211,
"scala" -> scala,
"java" -> Java8),
Map("platform" -> "native", "pluginversion" -> v, "workers" -> "1"))
Map("platform" -> "native", "workers" -> "1"))
}

ThisBuild / githubWorkflowBuildPreamble +=
Expand All @@ -57,7 +56,6 @@ ThisBuild / githubWorkflowBuild := Seq(
name = Some("Run the build script"),
env = Map(
"PLATFORM" -> "${{ matrix.platform }}",
"PLUGIN_VERSION" -> "${{ matrix.pluginversion }}",
"TRAVIS_SCALA_VERSION" -> "${{ matrix.scala }}",
"WORKERS" -> "${{ matrix.workers }}")))

Expand Down Expand Up @@ -161,13 +159,11 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
(n: Int) => if (r.contains(n)) strs else Seq.empty

val groups: Seq[Int => Seq[String]] = Seq(
mk(11 to 11)("-Xlint"),
mk(11 to 12)("-Ywarn-inaccessible", "-Ywarn-nullary-override",
mk(12 to 12)("-Ywarn-inaccessible", "-Ywarn-nullary-override",
"-Ywarn-nullary-unit", "-Xfuture", "-Xfatal-warnings", "-deprecation",
"-Ywarn-infer-any", "-Ywarn-unused-import"),
mk(11 to 13)("-encoding", "UTF-8", "-feature", "-unchecked",
"-Ywarn-dead-code", "-Ywarn-numeric-widen"),
mk(12 to 13)("-Xlint:-unused",
mk(12 to 13)("-encoding", "UTF-8", "-feature", "-unchecked",
"-Ywarn-dead-code", "-Ywarn-numeric-widen", "-Xlint:-unused",
"-Ywarn-unused:-patvars,-implicits,-locals,-privates,-explicits"))

val n = scalaMajorVersion.value
Expand Down Expand Up @@ -245,11 +241,7 @@ lazy val js = project.in(file("js"))
.settings(
Global / scalaJSStage := FastOptStage,
libraryDependencies +=
("org.scala-js" %% "scalajs-test-interface" % scalaJSVersion).withDottyCompat(scalaVersion.value),

scalacOptions ++= {
if (scalaVersion.value == "3.0.0-M1") Seq("-Yskip:explicitJSClasses") else Nil
},
("org.scala-js" %% "scalajs-test-interface" % scalaJSVersion).withDottyCompat(scalaVersion.value)
)
.enablePlugins(ScalaJSPlugin)

Expand All @@ -276,8 +268,8 @@ lazy val native = project.in(file("native"))
.settings(sharedSettings: _*)
.settings(
Compile / doc := (jvm / Compile / doc).value,
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.11.12"),
scalaVersion := Scala212,
crossScalaVersions := Seq(Scala212, Scala213),
// TODO: re-enable MiMa for native once published
mimaPreviousArtifacts := Set(),
libraryDependencies ++= Seq(
Expand Down
9 changes: 1 addition & 8 deletions project/plugin.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ def printAndDie(msg: String): Nothing = {
sys.error(msg)
}

// Update SCALANATIVE_VERSION in release.sh, as well
val scalaNativeVersion = env("SCALANATIVE_VERSION") match {
case Some("0.3.9") | Some("") | None => "0.3.9"
case Some("0.4.0") => "0.4.0"
case Some(v) => printAndDie(s"unsupported scala native version: $v")
}

addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")

Expand Down
6 changes: 2 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ runsbt "+ jvm/$CMD"
# step 4b: js releases
runsbt "+ js/$CMD"

# step 4c: native releases (clean versions)
SCALANATIVE_VERSION="0.3.9" runsbt "+ native/$CMD"
runsbt "+ native/clean"
SCALANATIVE_VERSION="0.4.0" runsbt "+ native/$CMD"
# step 4c: native releases
runsbt "+ native/$CMD"
2 changes: 0 additions & 2 deletions tools/travis-script.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
set -evu

export SCALANATIVE_VERSION="$PLUGIN_VERSION"

sbt_cmd=(sbt ++$TRAVIS_SCALA_VERSION)

if [[ "$PLATFORM" == "js" ]]; then
Expand Down

0 comments on commit 4e4b898

Please sign in to comment.