Skip to content

replace Travis-CI with GitHub Actions #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17]
scala: [2.11.12, 2.12.15, 2.13.6, 3.0.2]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: ${{matrix.java}}
- name: Test
run: sbt ++${{matrix.scala}} test package
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release
on:
push:
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 8
- run: sbt versionCheck ci-release
env:
PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}}
PGP_SECRET: ${{secrets.PGP_SECRET}}
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}
SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

17 changes: 4 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
lazy val scalaTestVersion = "3.2.9"
lazy val scalaTestVersion = "3.2.10"

ThisBuild / crossScalaVersions := Seq("3.0.2", "2.13.6", "2.12.15", "2.11.12")
ThisBuild / scalaVersion := crossScalaVersions.value.head

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

lazy val commonSettings = Seq(
scalacOptions ++= Seq("-deprecation", "-feature"),
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-scala-module sets these, so we don't need to


lazy val swing = project.in(file("."))
.settings(ScalaModulePlugin.scalaModuleSettings)
.settings(ScalaModulePlugin.scalaModuleOsgiSettings)
.settings(commonSettings)
.settings(
name := "scala-swing",
scalaModuleAutomaticModuleName := Some("scala.swing"),
Expand All @@ -34,25 +32,18 @@ lazy val swing = project.in(file("."))
case _ => sourceDir / "scala-2.13-"
}
},
// sources in (Compile, doc) := {
// if (isDotty.value) Nil else (sources in (Compile, doc)).value // dottydoc is currently broken
// },
)

lazy val examples = project.in(file("examples"))
.dependsOn(swing)
.settings(commonSettings)
.settings(
scalaVersion := (swing / scalaVersion).value,
run / fork := true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confident this isn't needed

fork := true,
)

lazy val uitest = project.in(file("uitest"))
.dependsOn(swing)
.settings(commonSettings)
.settings(
scalaVersion := (swing / scalaVersion).value,
run / fork := true,
fork := true,
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.2
sbt.version=1.5.5
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.3.0")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.1")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-scala-module now includes sbt-version-policy

addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.0")
1 change: 0 additions & 1 deletion src/main/scala/scala/swing/InternalFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package scala.swing

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

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


Expand Down