Skip to content

Commit

Permalink
Merge pull request #564 from scala/bye-bye-travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue authored Sep 29, 2021
2 parents 4ab3fff + b289ffc commit df9759b
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 94 deletions.
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.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 headerCheck versionPolicyCheck 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}}
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
scala-xml
[![Travis](https://img.shields.io/travis/scala/scala-xml.svg)](https://travis-ci.org/scala/scala-xml)
[![latest release for 2.12](https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-xml_2.12.svg?label=scala+2.12)](http://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.12)
[![latest release for 2.13](https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-xml_2.13.svg?label=scala+2.13)](http://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.13)
[![latest release for 3.0](https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-xml_3.svg?label=scala+3)](http://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_3)
Expand Down
5 changes: 5 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

publish / skip := true // root project

ThisBuild / startYear := Some(2002)
ThisBuild / licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))

Expand Down Expand Up @@ -33,6 +35,8 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(
name := "scala-xml",
scalaModuleAutomaticModuleName := Some("scala.xml"),
crossScalaVersions := Seq("2.13.6", "2.12.15", "3.0.2"),

scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq("-language:Scala2")
Expand Down Expand Up @@ -129,6 +133,7 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.jsEnablePlugins(ScalaJSJUnitPlugin)
.nativeSettings(
crossScalaVersions := Seq("2.13.6", "2.12.15"),
// Scala Native cannot run forked tests
Test / fork := false,
libraryDependencies += "org.scala-native" %%% "junit-runtime" % nativeVersion % Test,
Expand Down
57 changes: 0 additions & 57 deletions build.sh

This file was deleted.

12 changes: 3 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("1.7.0")

val scalaNativeVersion =
Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).getOrElse("0.4.0")

addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.4.0")
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
12 changes: 12 additions & 0 deletions shared/src/main/scala-2.13-/scala/xml/ScalaVersionSpecific.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

package scala.xml

import scala.collection.SeqLike
Expand Down

0 comments on commit df9759b

Please sign in to comment.