Skip to content
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
106 changes: 55 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: ['*']
branches: ['**']
push:
branches: ['*']
branches: ['**']
tags: [v*]

env:
Expand All @@ -27,43 +27,45 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.13, 2.13.6, 3.0.0]
java: [openjdk@1.11.0]
scala: [2.12.20, 2.13.16, 3.3.6]
java: [zulu@8, temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
- name: Setup Java (zulu@8)
if: matrix.java == 'zulu@8'
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: zulu
java-version: 8
cache: sbt

- name: Cache sbt
uses: actions/cache@v2
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v5
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
distribution: temurin
java-version: 17
cache: sbt

- name: Setup sbt
uses: sbt/setup-sbt@v1

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

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

- name: Compress target directories
run: tar cf targets.tar target stringdiff/.jvm/target stringdiff/.js/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v5
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -75,60 +77,62 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [openjdk@1.11.0]
scala: [2.13.16]
java: [zulu@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
- name: Setup Java (zulu@8)
if: matrix.java == 'zulu@8'
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: zulu
java-version: 8
cache: sbt

- name: Cache sbt
uses: actions/cache@v2
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v5
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.12.13)
uses: actions/download-artifact@v2
distribution: temurin
java-version: 17
cache: sbt

- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Download target directories (2.12.20)
uses: actions/download-artifact@v6
with:
name: target-${{ matrix.os }}-2.12.13-${{ matrix.java }}
name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }}

- name: Inflate target directories (2.12.13)
- name: Inflate target directories (2.12.20)
run: |
tar xf targets.tar
rm targets.tar

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

- name: Inflate target directories (2.13.6)
- name: Inflate target directories (2.13.16)
run: |
tar xf targets.tar
rm targets.tar

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

- name: Inflate target directories (3.0.0)
- name: Inflate target directories (3.3.6)
run: |
tar xf targets.tar
rm targets.tar

- run: sbt ++${{ matrix.scala }} ci-release
- run: sbt ci-release
8 changes: 6 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ name: Clean

on: push

permissions:
actions: write

jobs:
delete-artifacts:
name: Delete Artifacts
Expand All @@ -17,6 +20,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete artifacts
shell: bash {0}
run: |
# Customize those three lines with your repository and credentials:
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
Expand All @@ -25,7 +29,7 @@ jobs:
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
# A temporary file which receives HTTP response headers.
TMPFILE=/tmp/tmp.$$
TMPFILE=$(mktemp)
# An associative array, key: artifact name, value: number of artifacts of that name.
declare -A ARTCOUNT
Expand Down Expand Up @@ -56,4 +60,4 @@ jobs:
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
ghapi -X DELETE $REPO/actions/artifacts/$id
done
done
done
7 changes: 3 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inThisBuild(
organization := "app.tulz",
homepage := Some(url("https://github.com/tulz-app/stringdiff")),
licenses := List("MIT" -> url("https://github.com/tulz-app/stringdiff/blob/main/LICENSE.md")),
scmInfo := Some(ScmInfo(url("https://github.com/tulz-app/stringdiff"), "scm:git@github.com/tulz-app/laminext.git")),
scmInfo := Some(ScmInfo(url("https://github.com/tulz-app/stringdiff"), "scm:git@github.com/tulz-app/stringdiff.git")),
developers := List(Developer("yurique", "Iurii Malchenko", "i@yurique.com", url("https://github.com/yurique"))),
scalaVersion := ScalaVersions.v213,
description := "String diff for Scala",
Expand All @@ -14,7 +14,7 @@ inThisBuild(
),
Test / publishArtifact := false,
Test / parallelExecution := false,
githubWorkflowJavaVersions := Seq("openjdk@1.11.0"),
githubWorkflowJavaVersions += JavaSpec.temurin("17"),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))),
Expand All @@ -41,8 +41,7 @@ lazy val stringdiff =
.settings(
ScalaOptions.fixOptions,
libraryDependencies ++= Seq(
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.4.4",
"org.scalatest" %%% "scalatest" % "3.2.9" % Test
"org.scalatest" %%% "scalatest" % "3.2.9" % Test
)
)

Expand Down
6 changes: 3 additions & 3 deletions project/ScalaVersions.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object ScalaVersions {
val v212 = "2.12.13"
val v213 = "2.13.6"
val v3 = "3.0.0"
val v212 = "2.12.20"
val v213 = "2.13.16"
val v3 = "3.3.6"
}
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.12.0
14 changes: 5 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
logLevel := Level.Warn

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.19.0")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.29.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions stringdiff/src/main/scala-2.12/app/tulz/diff/compat/package.scala

This file was deleted.

This file was deleted.

This file was deleted.

Loading