Skip to content

Commit

Permalink
Merge pull request #20 from jatcwang/dep_update
Browse files Browse the repository at this point in the history
Dependency update (Scala 3.1.1)
  • Loading branch information
jatcwang authored Feb 1, 2022
2 parents 285f1da + 131da4c commit eb74eb1
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 50 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6, 3.0.1]
java: [adopt@1.11]
scala: [2.13.8, 3.1.1]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v12
- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
Expand All @@ -58,10 +60,10 @@ jobs:
run: gem install jekyll -v 4.1.1

- name: Check that workflows are up to date
run: sbt --client '++${{ matrix.scala }}; githubWorkflowCheck'
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- name: Build project
run: sbt --client '++${{ matrix.scala }}; test; makeMicrosite; publishLocal'
run: sbt ++${{ matrix.scala }} test makeMicrosite publishLocal

- name: Compress target directories
run: tar cf targets.tar modules/benchmarks/target target modules/munit/target docs/target modules/scalatest/target modules/core/target modules/cats/target modules/coretest/target project/target
Expand All @@ -79,19 +81,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [adopt@1.11]
scala: [2.13.8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v12
- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
Expand All @@ -105,22 +109,22 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.6)
- name: Download target directories (2.13.8)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}
name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }}

- name: Inflate target directories (2.13.6)
- name: Inflate target directories (2.13.8)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.0.1)
- name: Download target directories (3.1.1)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-3.0.1-${{ matrix.java }}
name: target-${{ matrix.os }}-3.1.1-${{ matrix.java }}

- name: Inflate target directories (3.0.1)
- name: Inflate target directories (3.1.1)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -138,4 +142,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt --client '++${{ matrix.scala }}; ci-release; publishMicrosite'
run: sbt ++${{ matrix.scala }} ci-release publishMicrosite
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
ghapi -X DELETE $REPO/actions/artifacts/$id
done
done
done
37 changes: 18 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
val munitVersion = "0.7.27"
val catsVersion = "2.6.1"
val scalatestVersion = "3.2.9"
import sbtghactions.JavaSpec

val scala213 = "2.13.6"
val scala3 = "3.0.1"
val munitVersion = "0.7.29"
val catsVersion = "2.7.0"
val scalatestVersion = "3.2.11"

val scala213 = "2.13.8"
val scala3 = "3.1.1"

val isScala3 = Def.setting {
// doesn't work well with >= 3.0.0 for `3.0.0-M1`
Expand Down Expand Up @@ -36,17 +38,15 @@ lazy val core = Project("difflicious-core", file("modules/core"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
if (isScala3.value) "com.softwaremill.magnolia1_3" %% "magnolia" % "1.0.0-M7"
// if (isScala3.value) "com.softwaremill.magnolia" %% "magnolia-core" % "2.0.0-M7-SNAPSHOT"
else "com.softwaremill.magnolia1_2" %% "magnolia" % "1.0.0-M7",
"dev.zio" %% "izumi-reflect" % "1.1.2",
"com.lihaoyi" %% "fansi" % "0.2.14",
) ++ (
if (isScala3.value)
Seq.empty
else
Seq("org.scala-lang" % "scala-reflect" % scala213)
),
"dev.zio" %% "izumi-reflect" % "2.0.8",
"com.lihaoyi" %% "fansi" % "0.3.0",
) ++ (if (isScala3.value) {
Seq("com.softwaremill.magnolia1_3" %% "magnolia" % "1.0.0")
} else
Seq(
"com.softwaremill.magnolia1_2" %% "magnolia" % "1.0.0",
"org.scala-lang" % "scala-reflect" % scala213,
)),
Compile / sourceGenerators += Def.task {
val file = (Compile / sourceManaged).value / "difflicious" / "TupleDifferInstances.scala"
IO.write(file, TupleDifferInstancesGen.fileContent)
Expand Down Expand Up @@ -108,7 +108,6 @@ lazy val docs: Project = project
.settings(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalatestVersion,
"org.scalameta" %% "mdoc" % "2.2.21",
),
makeMicrosite := Def.taskDyn {
val orig = (ThisProject / makeMicrosite).taskValue
Expand Down Expand Up @@ -165,7 +164,7 @@ lazy val commonSettings = Seq(
versionScheme := Some("early-semver"),
scalacOptions ++= (if (isScala3.value) Seq.empty[String] else Seq("-Wmacros:after")),
libraryDependencies ++= Seq(
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.0" cross CrossVersion.full),
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
).filterNot(_ => isScala3.value),
)
Expand All @@ -174,7 +173,7 @@ lazy val noPublishSettings = Seq(
publish / skip := true,
)

ThisBuild / githubWorkflowJavaVersions := Seq("adopt@1.11")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(RefPredicate.StartsWith(Ref.Tag("v")))
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Difflicious helps you find and compare the differences between values.
[![Release](https://img.shields.io/nexus/r/com.github.jatcwang/difflicious-munit_2.13?server=https%3A%2F%2Foss.sonatype.org)](https://oss.sonatype.org/content/repositories/releases/com/github/jatcwang/difflicious-munit_2.13/)
[![(https://badges.gitter.im/gitterHQ/gitter.png)](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jatcwang/difflicious)

- Readable and Actionable diff results
- Flexible & Configurable diffing logic
- Readable diff results
- Flexible diffing logic
- Ignore unimportant fields when comparing
- Compare `List`s of items independent of order
- Match `Map` entries by key and show diffs of the values
Expand Down
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.3
sbt.version=1.6.1
16 changes: 8 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") // override mdoc version from microsite
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.0") // override mdoc version from microsite

0 comments on commit eb74eb1

Please sign in to comment.