Skip to content

Commit

Permalink
Add scala 3.0.0-RC3
Browse files Browse the repository at this point in the history
Use scalac-options library
  • Loading branch information
nafg committed May 9, 2021
1 parent 379a60c commit d414d9f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 23 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.13, 2.13.5]
scala: [2.12.13, 2.13.5, 3.0.0-RC3]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.5]
scala: [3.0.0-RC3]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -117,6 +117,16 @@ jobs:
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.0.0-RC3)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-3.0.0-RC3-${{ matrix.java }}

- name: Inflate target directories (3.0.0-RC3)
run: |
tar xf targets.tar
rm targets.tar
- env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand Down
1 change: 1 addition & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pull_request_rules:
- author=scala-steward
- check-success=Build and Test (ubuntu-latest, 2.12.13, [email protected])
- check-success=Build and Test (ubuntu-latest, 2.13.5, [email protected])
- check-success=Build and Test (ubuntu-latest, 3.0.0-RC3, [email protected])
actions:
merge:
strict: true
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ trait AgiIvrCommandInterpreter extends IOIvrCommandInterpreter {

override def waitForSilence(ms: Int, repeat: Int = 1, timeoutSec: Option[Int] = None) = IO {
channel.exec("WaitForSilence", s"$ms,$repeat" + timeoutSec.map("," + _).getOrElse(""))
()
}

override def monitor(file: File) = IO {
channel.exec("System", s"mkdir -p ${file.getParentFile.getAbsolutePath}")
channel.exec("MixMonitor", file.getAbsolutePath)
()
}

override def hangup = IO {
Expand Down
42 changes: 24 additions & 18 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
ThisBuild / crossScalaVersions := Seq("2.12.13", "2.13.5")
import _root_.io.github.nafg.scalacoptions.{ScalacOptions, options}

ThisBuild / crossScalaVersions := Seq("2.12.13", "2.13.5", "3.0.0-RC3")
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last
ThisBuild / organization := "io.github.nafg.simpleivr"

def ScalaTest = "org.scalatest" %% "scalatest" % "3.2.8"

ThisBuild / scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-explaintypes",
"-Xlint:_",
"-Ywarn-dead-code",
"-Ywarn-extra-implicit",
"-Ywarn-numeric-widen",
"-Ywarn-unused:_",
"-Ywarn-value-discard"
)

ThisBuild / scalacOptions ++=
(if (scalaVersion.value.startsWith("2.12."))
List("-language:higherKinds", "-Xfuture", "-Ypartial-unification")
else
Nil)
ScalacOptions.all(scalaVersion.value)(
(o: options.Common) =>
o.deprecation ++
o.feature ++
o.unchecked,
(o: options.V2) =>
o.explaintypes ++ Seq(
"-Xlint:_",
"-Ywarn-dead-code",
"-Ywarn-extra-implicit",
"-Ywarn-numeric-widen",
"-Ywarn-unused:_",
"-Ywarn-value-discard"
),
(o: options.V2_12) =>
o.language("higherKinds") ++
o.Xfuture ++
o.YpartialUnification,
(o: options.V3) =>
o.explainTypes
)

lazy val core = project
.settings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ object Text2waveSpeakGenerator extends SpeakGenerator {
text2wave.waitFor()
Source.fromInputStream(text2wave.getErrorStream).getLines() foreach println
Files.copy(tmpFile, Channels.newOutputStream(writeChan))
()
}
}
.flatMap { either =>
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")
libraryDependencies += "io.github.nafg.mergify" %% "mergify-writer" % "0.2.1"
libraryDependencies += "io.github.nafg.scalac-options" %% "scalac-options" % "0.1.4"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package simpleivr.testing

import scala.io.AnsiColor

import cats.Id
import cats.{Id, catsInstancesForId}
import simpleivr.{IvrCommand, IvrStep}

import scala.io.AnsiColor


trait InteractionTestBase {
case class RunWithConfig(error: String => Nothing, logIvrCommand: (IvrCommand[_], Any) => Unit = (_, _) => ()) {
Expand Down

0 comments on commit d414d9f

Please sign in to comment.