Skip to content

Commit

Permalink
deps: update all sorts of stuff (#260)
Browse files Browse the repository at this point in the history
This updates a few different things:
  - Bumps to the latest mill 0.10.5
  - Bumps to the latest Scala versions
  - Drops the 0.x support for ScalaJS
  - Moves Scala native to 0.4.x
  - Disables Mima on Scala 3 to address lightbend-labs/mima#693 until it's released
  - Bumps scala reflect
  - Adds in dependabot
  - Starts to cross test on 8 and 17
  - updates checkout and java actions
  • Loading branch information
ckipp01 authored Jul 4, 2022
1 parent 28119e6 commit 75528c7
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 29 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
25 changes: 17 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,30 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '17']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
java-version: ${{ matrix.java }}

- name: Run tests
run: ./mill -i all __.publishArtifacts __.test

check-binary-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8

- name: Check Binary Compatibility
run: ./mill -i __.mimaReportBinaryIssues

Expand All @@ -45,10 +53,12 @@ jobs:
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8

- name: Publish to Maven Central
run: |
if [[ $(git tag --points-at HEAD) != '' ]]; then
Expand All @@ -72,5 +82,4 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body:
draft: false
1 change: 1 addition & 0 deletions .mill-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.10.5
41 changes: 22 additions & 19 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima::0.0.9`
import $ivy.`com.github.lolgab::mill-mima::0.0.10`
import com.github.lolgab.mill.mima._
import mill.scalalib.api.Util.isScala3

val dottyVersions = sys.props.get("dottyVersion").toList
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList

val scala2VersionsAndDotty = "2.11.12" :: "2.12.13" :: "2.13.4" :: dottyVersions
val scala30 = "3.0.0"
val scalaVersions = "2.11.12" :: "2.12.16" :: "2.13.8" :: "3.1.3" :: communityBuildDottyVersion

val scalaJSVersions = for {
scalaV <- scala30 :: scala2VersionsAndDotty
scalaJSV <- Seq("0.6.33", "1.5.1")
if scalaV.startsWith("2.") || scalaJSV.startsWith("1.")
} yield (scalaV, scalaJSV)
val scalaJSVersions = scalaVersions.map((_, "1.10.1"))
val scalaNativeVersions = scalaVersions.map((_, "0.4.5"))

val scalaNativeVersions = for {
scalaV <- "3.1.1" :: scala2VersionsAndDotty
scalaNativeV <- Seq("0.4.3")
} yield (scalaV, scalaNativeV)
val scalaReflectVersion = "1.1.2"

trait UtestModule extends PublishModule with Mima {
trait MimaCheck extends Mima {
def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq
}

trait UtestModule extends PublishModule with MimaCheck {
def artifactName = "utest"

def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq
def crossScalaVersion: String

// Temporary until the next version of Mima gets released with
// https://github.com/lightbend/mima/issues/693 included in the release.
def mimaPreviousArtifacts =
if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts()

def publishVersion = VcsVersion.vcsState().format()

def pomSettings = PomSettings(
description = artifactName(),
organization = "com.lihaoyi",
url = "https://github.com/lihaoyi/utest",
url = "https://github.com/com-lihaoyi/utest",
licenses = Seq(License.MIT),
versionControl = VersionControl.github(owner = "com-lihaoyi", repo = "utest"),
developers = Seq(
Expand Down Expand Up @@ -82,13 +85,13 @@ trait UtestTestModule extends ScalaModule with TestModule {
}

object utest extends Module {
object jvm extends Cross[JvmUtestModule](scala30 :: scala2VersionsAndDotty: _*)
object jvm extends Cross[JvmUtestModule](scalaVersions: _*)
class JvmUtestModule(val crossScalaVersion: String)
extends UtestMainModule(crossScalaVersion) with ScalaModule with UtestModule {
def ivyDeps = Agg(
ivy"org.scala-sbt:test-interface::1.0"
) ++ (if (crossScalaVersion.startsWith("2")) Agg(
ivy"org.portable-scala::portable-scala-reflect::0.1.1",
ivy"org.portable-scala::portable-scala-reflect::$scalaReflectVersion",
ivy"org.scala-lang:scala-reflect:$crossScalaVersion"
) else Agg())
object test extends Tests with UtestTestModule{
Expand All @@ -102,7 +105,7 @@ object utest extends Module {
def offset = os.up
def ivyDeps = Agg(
ivy"org.scala-js::scalajs-test-interface:$crossJSVersion".withDottyCompat(crossScalaVersion),
ivy"org.portable-scala::portable-scala-reflect::0.1.1".withDottyCompat(crossScalaVersion)
ivy"org.portable-scala::portable-scala-reflect::$scalaReflectVersion".withDottyCompat(crossScalaVersion)
) ++ (if(crossScalaVersion.startsWith("2")) Agg(
ivy"org.scala-lang:scala-reflect:$crossScalaVersion"
) else Agg())
Expand Down
4 changes: 2 additions & 2 deletions mill
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a wrapper script, that automatically download mill from GitHub release pages
# You can give the required mill version with MILL_VERSION env variable
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
DEFAULT_MILL_VERSION=0.10.0
DEFAULT_MILL_VERSION=0.10.5

set -e

Expand Down Expand Up @@ -34,7 +34,7 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then
ASSEMBLY="-assembly"
fi
DOWNLOAD_FILE=$MILL_EXEC_PATH-tmp-download
MILL_VERSION_TAG=$(echo $MILL_VERSION | sed 's/\([^-]+\)\(-M[0-9]+\)?\(-.*\)?/\1\2/')
MILL_VERSION_TAG=$(echo $MILL_VERSION | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/')
MILL_DOWNLOAD_URL="https://github.com/lihaoyi/mill/releases/download/${MILL_VERSION_TAG}/$MILL_VERSION${ASSEMBLY}"
curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL"
chmod +x "$DOWNLOAD_FILE"
Expand Down

0 comments on commit 75528c7

Please sign in to comment.