Skip to content

Commit cfc9f4d

Browse files
authored
Scala 3.0.0-M2 (#54)
* Prepare for Scala 3.0.0-M2 - need new sbt-spiewak and cats releases first though * More preparation * More preparation * Upgrace to cats 2.3.0 * Update workflow * Bump cats-effect version
1 parent c573649 commit cfc9f4d

3 files changed

Lines changed: 19 additions & 53 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@ on:
1515
tags: [v*]
1616

1717
env:
18-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
19-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2019
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
20+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
2121
PGP_SECRET: ${{ secrets.PGP_SECRET }}
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2322

2423
jobs:
2524
build:
2625
name: Build and Test
2726
strategy:
2827
matrix:
2928
os: [ubuntu-latest]
30-
scala: [0.27.0-RC1, 3.0.0-M1, 2.12.11, 2.13.3]
29+
scala: [3.0.0-M2, 3.0.0-M1, 2.12.11, 2.13.3]
3130
java: [adopt@1.8]
3231
runs-on: ${{ matrix.os }}
3332
steps:
@@ -70,7 +69,7 @@ jobs:
7069
publish:
7170
name: Publish Artifacts
7271
needs: [build]
73-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
72+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
7473
strategy:
7574
matrix:
7675
os: [ubuntu-latest]
@@ -100,12 +99,12 @@ jobs:
10099
~/Library/Caches/Coursier/v1
101100
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
102101

103-
- name: Download target directories (0.27.0-RC1)
102+
- name: Download target directories (3.0.0-M2)
104103
uses: actions/download-artifact@v2
105104
with:
106-
name: target-${{ matrix.os }}-0.27.0-RC1-${{ matrix.java }}
105+
name: target-${{ matrix.os }}-3.0.0-M2-${{ matrix.java }}
107106

108-
- name: Inflate target directories (0.27.0-RC1)
107+
- name: Inflate target directories (3.0.0-M2)
109108
run: |
110109
tar xf targets.tar
111110
rm targets.tar

build.sbt

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,23 @@ ThisBuild / organizationName := "Typelevel"
99
ThisBuild / publishGithubUser := "mpilquist"
1010
ThisBuild / publishFullName := "Michael Pilquist"
1111

12-
ThisBuild / crossScalaVersions := List("0.27.0-RC1", "3.0.0-M1", "2.12.11", "2.13.3")
12+
ThisBuild / crossScalaVersions := List("3.0.0-M2", "3.0.0-M1", "2.12.11", "2.13.3")
1313

1414
ThisBuild / versionIntroduced := Map(
15-
"0.27.0-RC1" -> "0.1.99", // Disable for now due to bug in sbt-spiewak with RCs
16-
"3.0.0-M1" -> "0.1.99" // Disable for now due to bug in sbt-spiewak with RCs
15+
"3.0.0-M1" -> "0.1.99", // Disable for now due to bug in sbt-spiewak with RCs
16+
"3.0.0-M2" -> "0.1.99" // Disable for now due to bug in sbt-spiewak with RCs
1717
)
1818

19-
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
20-
RefPredicate.Equals(Ref.Branch("main")),
21-
RefPredicate.StartsWith(Ref.Tag("v"))
22-
)
23-
ThisBuild / githubWorkflowEnv ++= Map(
24-
"SONATYPE_USERNAME" -> s"$${{ secrets.SONATYPE_USERNAME }}",
25-
"SONATYPE_PASSWORD" -> s"$${{ secrets.SONATYPE_PASSWORD }}",
26-
"PGP_SECRET" -> s"$${{ secrets.PGP_SECRET }}",
27-
"PGP_PASSPHRASE" -> s"$${{ secrets.PGP_PASSPHRASE }}"
28-
)
29-
ThisBuild / githubWorkflowTargetTags += "v*"
30-
31-
ThisBuild / githubWorkflowPublishPreamble +=
32-
WorkflowStep.Run(
33-
List("echo $PGP_SECRET | base64 -d | gpg --import"),
34-
name = Some("Import signing key")
35-
)
19+
ThisBuild / spiewakCiReleaseSnapshots := true
3620

37-
ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("release")))
21+
ThisBuild / spiewakMainBranches := List("main")
3822

3923
ThisBuild / homepage := Some(url("https://github.com/typelevel/scalacheck-effect"))
4024

25+
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
26+
27+
ThisBuild / scalafmtOnCompile := true
28+
4129
ThisBuild / scmInfo := Some(
4230
ScmInfo(
4331
url("https://github.com/typelevel/scalacheck-effect"),
@@ -48,40 +36,24 @@ ThisBuild / scmInfo := Some(
4836
lazy val root = project
4937
.in(file("."))
5038
.aggregate(core.jvm, core.js, munit.jvm, munit.js)
51-
.settings(noPublishSettings)
52-
53-
val commonSettings = Seq(
54-
homepage := Some(url("https://github.com/typelevel/scalacheck-effect")),
55-
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
56-
libraryDependencies ++= {
57-
if (isDotty.value) Nil
58-
else Seq(scalafixSemanticdb)
59-
},
60-
scalafmtOnCompile := true
61-
)
39+
.enablePlugins(NoPublishPlugin, SonatypeCiRelease)
6240

6341
lazy val core = crossProject(JSPlatform, JVMPlatform)
64-
.settings(commonSettings)
6542
.settings(
6643
name := "scalacheck-effect",
6744
Compile / scalacOptions ~= {
6845
_.filterNot(_ == "-Xfatal-warnings")
6946
} // we need to turn this off because scalacheck's API uses Stream, which is deprecated
7047
)
71-
.settings(dottyLibrarySettings)
7248
.settings(dottyJsSettings(ThisBuild / crossScalaVersions))
7349
.settings(
7450
libraryDependencies ++= List(
7551
"org.scalacheck" %%% "scalacheck" % "1.15.1",
76-
"org.typelevel" %%% "cats-core" % "2.3.0-M2"
52+
"org.typelevel" %%% "cats-core" % "2.3.0"
7753
)
7854
)
79-
.jsSettings(
80-
crossScalaVersions := crossScalaVersions.value.filter(_.startsWith("2."))
81-
)
8255

8356
lazy val munit = crossProject(JSPlatform, JVMPlatform)
84-
.settings(commonSettings)
8557
.settings(
8658
name := "scalacheck-effect-munit",
8759
testFrameworks += new TestFramework("munit.Framework")
@@ -90,14 +62,10 @@ lazy val munit = crossProject(JSPlatform, JVMPlatform)
9062
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))
9163
)
9264
.dependsOn(core)
93-
.settings(dottyLibrarySettings)
9465
.settings(dottyJsSettings(ThisBuild / crossScalaVersions))
9566
.settings(
9667
libraryDependencies ++= List(
9768
"org.scalameta" %%% "munit-scalacheck" % "0.7.19",
98-
"org.typelevel" %%% "cats-effect" % "2.3.0-M1" % Test
69+
"org.typelevel" %%% "cats-effect" % "2.3.0" % Test
9970
)
10071
)
101-
.jsSettings(
102-
crossScalaVersions := crossScalaVersions.value.filter(_.startsWith("2."))
103-
)

project/plugins.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
33
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
44
addSbtPlugin("com.codecommit" % "sbt-spiewak-sonatype" % "0.18.3")
55
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.5")
6-
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23")

0 commit comments

Comments
 (0)