Skip to content

Commit 49f7a2f

Browse files
authored
Support Scala 3 (lambdaworks#74)
* Support Scala 3 * Provide 'publishLocal' job * Fix publish local job
1 parent 5471253 commit 49f7a2f

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
scala: ['2.12.17', '2.13.10']
35+
java: ["8", "11", "17"]
36+
scala: ["2.12.17", "2.13.10", "3.2.2"]
3637
steps:
3738
- name: Checkout current branch
3839
uses: actions/checkout@v3.0.2
@@ -47,7 +48,7 @@ jobs:
4748
- name: Run tests
4849
run: sbt ++${{ matrix.scala }}! test
4950

50-
test-deploy:
51+
website:
5152
runs-on: ubuntu-latest
5253
timeout-minutes: 10
5354
steps:
@@ -64,9 +65,26 @@ jobs:
6465
- name: Check website generation
6566
run: sbt docs/docusaurusCreateSite
6667

68+
publish-local:
69+
runs-on: ubuntu-20.04
70+
timeout-minutes: 10
71+
steps:
72+
- name: Checkout current branch
73+
uses: actions/checkout@v3.3.0
74+
- name: Setup Java
75+
uses: actions/setup-java@v3.9.0
76+
with:
77+
distribution: temurin
78+
java-version: 17
79+
check-latest: true
80+
- name: Cache scala dependencies
81+
uses: coursier/cache-action@v6
82+
- name: Check that building packages works
83+
run: sbt +publishLocal
84+
6785
ci:
6886
runs-on: ubuntu-latest
69-
needs: [lint, test, test-deploy]
87+
needs: [lint, test, website, publish-local]
7088
steps:
7189
- name: Aggregate outcomes
7290
run: echo "build succeeded"

build.sbt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import Dependencies._
22

33
Global / onChangedBuildSource := ReloadOnSourceChanges
44

5+
val Scala212: String = "2.12.17"
6+
val Scala213: String = "2.13.10"
7+
val Scala3: String = "3.2.2"
8+
59
inThisBuild(
610
List(
7-
scalaVersion := "2.13.10",
11+
scalaVersion := Scala213,
812
organization := "io.lambdaworks",
913
organizationName := "LambdaWorks",
1014
organizationHomepage := Some(url("https://www.lambdaworks.io/")),
@@ -39,11 +43,11 @@ ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaV
3943
lazy val root = (project in file("."))
4044
.settings(
4145
name := "scurl-detector",
42-
crossScalaVersions := List("2.12.17", "2.13.10"),
46+
crossScalaVersions := List(Scala212, Scala213, Scala3),
4347
libraryDependencies ++= All,
4448
buildInfoKeys := List[BuildInfoKey](organization, name, version),
4549
buildInfoPackage := "detection",
46-
semanticdbEnabled := true,
50+
semanticdbEnabled := scalaVersion.value != Scala3, // enable SemanticDB
4751
semanticdbVersion := scalafixSemanticdb.revision,
4852
scalacOptions += {
4953
CrossVersion.partialVersion(scalaVersion.value) match {

0 commit comments

Comments
 (0)