Skip to content

Commit 31c24ac

Browse files
committed
replace Travis-CI with GitHub Actions
and: * upgrade sbt to 1.5.5 (was 1.5.2) * upgrade sbt-scala-module to 3.0.0 (was 2.3.0) * upgrade Scala versions (2.12.15, 2.13.6, 3.0.2) * upgrade ScalaTest to 3.2.10 (was 3.2.9) * add JDK 17 to CI matrix * a few other minor cleanups
1 parent 84dcb7b commit 31c24ac

File tree

7 files changed

+52
-42
lines changed

7 files changed

+52
-42
lines changed

Diff for: .github/workflows/ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
scala: [2.11.12, 2.12.15, 2.13.6, 3.0.2]
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- uses: coursier/cache-action@v6
20+
- uses: actions/setup-java@v2
21+
with:
22+
distribution: adopt
23+
java-version: ${{matrix.java}}
24+
- name: Test
25+
run: sbt ++${{matrix.scala}} test package

Diff for: .github/workflows/release.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
on:
3+
push:
4+
tags: ["*"]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 0
12+
- uses: actions/setup-java@v2
13+
with:
14+
distribution: adopt
15+
java-version: 8
16+
- run: sbt versionCheck ci-release
17+
env:
18+
PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}}
19+
PGP_SECRET: ${{secrets.PGP_SECRET}}
20+
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}
21+
SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}}

Diff for: .travis.yml

-25
This file was deleted.

Diff for: build.sbt

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
lazy val scalaTestVersion = "3.2.9"
1+
lazy val scalaTestVersion = "3.2.10"
2+
3+
ThisBuild / crossScalaVersions := Seq("3.0.2", "2.13.6", "2.12.15", "2.11.12")
4+
ThisBuild / scalaVersion := crossScalaVersions.value.head
25

36
// We use <epoch>.<major>.<minor> like 99% of Scala libraries.
47
// Versions are binary compatible within x.y.* but not within x.*.*
58
ThisBuild / versionScheme := Some("pvp")
69
ThisBuild / versionPolicyIntention := Compatibility.None // 3.0.0
710

8-
lazy val commonSettings = Seq(
9-
scalacOptions ++= Seq("-deprecation", "-feature"),
10-
)
11-
1211
lazy val swing = project.in(file("."))
1312
.settings(ScalaModulePlugin.scalaModuleSettings)
1413
.settings(ScalaModulePlugin.scalaModuleOsgiSettings)
15-
.settings(commonSettings)
1614
.settings(
1715
name := "scala-swing",
1816
scalaModuleAutomaticModuleName := Some("scala.swing"),
@@ -34,25 +32,18 @@ lazy val swing = project.in(file("."))
3432
case _ => sourceDir / "scala-2.13-"
3533
}
3634
},
37-
// sources in (Compile, doc) := {
38-
// if (isDotty.value) Nil else (sources in (Compile, doc)).value // dottydoc is currently broken
39-
// },
4035
)
4136

4237
lazy val examples = project.in(file("examples"))
4338
.dependsOn(swing)
44-
.settings(commonSettings)
4539
.settings(
46-
scalaVersion := (swing / scalaVersion).value,
4740
run / fork := true,
4841
fork := true,
4942
)
5043

5144
lazy val uitest = project.in(file("uitest"))
5245
.dependsOn(swing)
53-
.settings(commonSettings)
5446
.settings(
55-
scalaVersion := (swing / scalaVersion).value,
5647
run / fork := true,
5748
fork := true,
5849
)

Diff for: project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.2
1+
sbt.version=1.5.5

Diff for: project/plugins.sbt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.3.0")
2-
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.1")
1+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.0")

Diff for: src/main/scala/scala/swing/InternalFrame.scala

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package scala.swing
22

33
import javax.swing.{Icon, JInternalFrame, WindowConstants}
44

5-
import scala.swing.MenuBar.NoMenuBar
65
import scala.swing.event.{InternalFrameActivated, InternalFrameClosed, InternalFrameClosing, InternalFrameDeactivated, InternalFrameDeiconified, InternalFrameIconified, InternalFrameOpened}
76

87

0 commit comments

Comments
 (0)