Skip to content

Commit f7d789f

Browse files
authored
Merge pull request #122 from scala/bye-bye-travisci
2 parents e0d0bba + e384933 commit f7d789f

File tree

5 files changed

+40
-45
lines changed

5 files changed

+40
-45
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
test:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
java: [8, 11, 17]
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- uses: coursier/cache-action@v6
19+
- uses: actions/setup-java@v2
20+
with:
21+
distribution: temurin
22+
java-version: ${{matrix.java}}
23+
- name: Test
24+
run: sbt testAll

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

build.sbt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
21
name := "compiler-benchmark"
32

43
version := "1.0-SNAPSHOT"
54

6-
def scala212 = "2.12.12"
5+
def scala212 = "2.12.15"
76
def dottyLatest = "0.25.0"
8-
scalaVersion in ThisBuild := scala212
7+
ThisBuild / scalaVersion := scala212
98
val JmhConfig = config("jmh")
109

1110
commands += Command.command("testAll") { s =>
12-
"test:compile" ::
11+
"Test/compile" ::
1312
"compilation/test" ::
1413
"hot -psource=scalap -wi 1 -i 1 -f1" ::
1514
s"++$dottyLatest" ::
1615
"compilation/test" ::
1716
"hot -psource=re2s -wi 1 -i 1 -f1" ::
1817
s"++$scala212" ::
19-
"micro/jmh:run -w1 -f1" ::
18+
"micro/Jmh/run -w1 -f1" ::
2019
s
2120
}
2221

23-
resolvers in ThisBuild += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
22+
ThisBuild / resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
2423

2524
// Convenient access to builds from PR validation
26-
resolvers in ThisBuild ++= (
25+
ThisBuild / resolvers ++= (
2726
if (scalaVersion.value.endsWith("-SNAPSHOT"))
2827
List(
2928
"pr-scala snapshots" at "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/",
@@ -32,7 +31,7 @@ resolvers in ThisBuild ++= (
3231
Nil
3332
)
3433

35-
resolvers in ThisBuild += Resolver.mavenLocal
34+
ThisBuild / resolvers += Resolver.mavenLocal
3635

3736
lazy val infrastructure = addJmh(project).settings(
3837
description := "Infrastrucuture to persist benchmark results annotated with metadata from Git",
@@ -61,19 +60,19 @@ lazy val compilation = addJmh(project).settings(
6160
crossScalaVersions := List(scala212, dottyLatest),
6261
unmanagedSourceDirectories.in(Compile) +=
6362
sourceDirectory.in(Compile).value / (if (isDotty.value) "dotc" else "scalac"),
64-
mainClass in (Jmh, run) := Some("scala.bench.ScalacBenchmarkRunner"),
63+
Jmh / run / mainClass := Some("scala.bench.ScalacBenchmarkRunner"),
6564
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
66-
testOptions in Test += Tests.Argument(TestFrameworks.JUnit),
67-
fork in (Test, test) := true, // jmh scoped tasks run with fork := true.
65+
Test / testOptions += Tests.Argument(TestFrameworks.JUnit),
66+
Test / test / fork := true, // jmh scoped tasks run with fork := true.
6867
).settings(addJavaOptions).dependsOn(infrastructure)
6968

7069
lazy val javaCompilation = addJmh(project).settings(
7170
description := "Black box benchmark of the java compiler",
7271
crossPaths := false,
73-
mainClass in (Jmh, run) := Some("scala.bench.ScalacBenchmarkRunner"),
72+
Jmh / run / mainClass := Some("scala.bench.ScalacBenchmarkRunner"),
7473
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
75-
testOptions in Test += Tests.Argument(TestFrameworks.JUnit),
76-
fork in (Test, test) := true // jmh scoped tasks run with fork := true.
74+
Test / testOptions += Tests.Argument(TestFrameworks.JUnit),
75+
Test / test/ fork := true // jmh scoped tasks run with fork := true.
7776
).settings(addJavaOptions).dependsOn(infrastructure)
7877

7978
lazy val micro = addJmh(project).settings(
@@ -116,7 +115,7 @@ def addJmh(project: Project): Project = {
116115
// output paths overlapping. This is because sbt-jmh declares the `jmh` config as extending `test`, but
117116
// configures `classDirectory in Jmh := classDirectory in Compile`.
118117
project.enablePlugins(JmhPlugin).overrideConfigs(JmhConfig.extend(Compile)).settings(
119-
version in Jmh := jmhV
118+
Jmh / version := jmhV
120119
)
121120
}
122121

project/build.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
sbt.version=1.3.10
2-
1+
sbt.version=1.3.13

project/plugins.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// Comment to get more information during initialization
22
logLevel := Level.Warn
33

4-
resolvers += Opts.resolver.sonatypeSnapshots
5-
64
// sbt-jmh plugin - pulls in JMH dependencies too
7-
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2")
5+
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
86

97
// sbt-dotty plugin - to support `scalaVersion := "0.x"`
108
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.2")

0 commit comments

Comments
 (0)