Skip to content

Commit

Permalink
scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
regis-leray committed Jun 1, 2022
1 parent d5bd2b8 commit 8ed5952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
fail-fast: false
matrix:
java: ['[email protected]']
scala: ['2.11.12', '2.12.15', '2.13.8']
scala: ['2.12.15', '2.13.8', '3.1.2']
steps:
- name: Checkout current branch
uses: actions/[email protected]
Expand All @@ -63,12 +63,8 @@ jobs:
- name: Start containers
run: |
docker-compose -f "docker-compose.yml" up -d --build
- name: Test 2.x
if: ${{ !startsWith(matrix.scala, '3.') }}
- name: Test
run: ./sbt ++${{ matrix.scala }}! test
# - name: Test 3.x
# if: ${{ startsWith(matrix.scala, '3.') }}
# run: ./sbt ++${{ matrix.scala }}! testDotty

testJvms:
runs-on: ubuntu-20.04
Expand Down
20 changes: 3 additions & 17 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import BuildInfoKeys._
import scalafix.sbt.ScalafixPlugin.autoImport._

object BuildHelper {
val Scala211 = "2.11.12"
val Scala212 = "2.12.15"
val Scala213 = "2.13.5"
val ScalaDotty = "3.1.0"
val ScalaDotty = "3.1.2"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -108,28 +109,13 @@ object BuildHelper {
"-Xmax-classfile-name",
"242"
) ++ std2xOptions ++ optimizerOptions(optimize)
case Some((2, 11)) =>
Seq(
"-Ypartial-unification",
"-Yno-adapted-args",
"-Ywarn-inaccessible",
"-Ywarn-infer-any",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Xexperimental",
"-Ywarn-unused-import",
"-Xfuture",
"-Xsource:2.13",
"-Xmax-classfile-name",
"242"
)
case _ => Seq.empty
}

def stdSettings(prjName: String) =
Seq(
name := s"$prjName",
crossScalaVersions := Seq(Scala212, Scala213),
crossScalaVersions := Seq(Scala211, Scala212, Scala213),
ThisBuild / scalaVersion := Scala213,
scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value),
semanticdbEnabled := scalaVersion.value != ScalaDotty, // enable SemanticDB
Expand Down

0 comments on commit 8ed5952

Please sign in to comment.