Skip to content

Commit c84cc76

Browse files
authored
update CI and all that (#561)
* update CI and all that * update mergify * update scala, SN * Upgrade everything * regenerate workflow * not just patches, just merge everything Steward sends
1 parent e75c38d commit c84cc76

File tree

8 files changed

+58
-81
lines changed

8 files changed

+58
-81
lines changed

.github/workflows/ci.yml

+31-47
Original file line numberDiff line numberDiff line change
@@ -27,45 +27,37 @@ jobs:
2727
strategy:
2828
matrix:
2929
os: [ubuntu-latest]
30-
scala: [3.3.0]
31-
java: [temurin@11]
30+
scala: [3.6.4]
31+
java: [zulu@8]
3232
runs-on: ${{ matrix.os }}
3333
steps:
3434
- name: Checkout current branch (full)
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
3636
with:
3737
fetch-depth: 0
3838

39-
- name: Setup Java (temurin@11)
40-
if: matrix.java == 'temurin@11'
41-
uses: actions/setup-java@v2
39+
- name: Setup Java (zulu@8)
40+
if: matrix.java == 'zulu@8'
41+
uses: actions/setup-java@v4
4242
with:
43-
distribution: temurin
44-
java-version: 11
43+
distribution: zulu
44+
java-version: 8
45+
cache: sbt
4546

46-
- name: Cache sbt
47-
uses: actions/cache@v2
48-
with:
49-
path: |
50-
~/.sbt
51-
~/.ivy2/cache
52-
~/.coursier/cache/v1
53-
~/.cache/coursier/v1
54-
~/AppData/Local/Coursier/Cache/v1
55-
~/Library/Caches/Coursier/v1
56-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
47+
- name: Setup sbt
48+
uses: sbt/setup-sbt@v1
5749

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

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

6456
- name: Compress target directories
6557
run: tar cf targets.tar target app/.jvm/target app/.native/target project/target
6658

6759
- name: Upload target directories
68-
uses: actions/upload-artifact@v2
60+
uses: actions/upload-artifact@v4
6961
with:
7062
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
7163
path: targets.tar
@@ -77,43 +69,35 @@ jobs:
7769
strategy:
7870
matrix:
7971
os: [ubuntu-latest]
80-
scala: [3.3.0]
81-
java: [temurin@11]
72+
scala: [3.6.4]
73+
java: [zulu@8]
8274
runs-on: ${{ matrix.os }}
8375
steps:
8476
- name: Checkout current branch (full)
85-
uses: actions/checkout@v2
77+
uses: actions/checkout@v4
8678
with:
8779
fetch-depth: 0
8880

89-
- name: Setup Java (temurin@11)
90-
if: matrix.java == 'temurin@11'
91-
uses: actions/setup-java@v2
81+
- name: Setup Java (zulu@8)
82+
if: matrix.java == 'zulu@8'
83+
uses: actions/setup-java@v4
9284
with:
93-
distribution: temurin
94-
java-version: 11
85+
distribution: zulu
86+
java-version: 8
87+
cache: sbt
9588

96-
- name: Cache sbt
97-
uses: actions/cache@v2
98-
with:
99-
path: |
100-
~/.sbt
101-
~/.ivy2/cache
102-
~/.coursier/cache/v1
103-
~/.cache/coursier/v1
104-
~/AppData/Local/Coursier/Cache/v1
105-
~/Library/Caches/Coursier/v1
106-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
107-
108-
- name: Download target directories (3.3.0)
109-
uses: actions/download-artifact@v2
89+
- name: Setup sbt
90+
uses: sbt/setup-sbt@v1
91+
92+
- name: Download target directories (3.6.4)
93+
uses: actions/download-artifact@v4
11094
with:
111-
name: target-${{ matrix.os }}-3.3.0-${{ matrix.java }}
95+
name: target-${{ matrix.os }}-3.6.4-${{ matrix.java }}
11296

113-
- name: Inflate target directories (3.3.0)
97+
- name: Inflate target directories (3.6.4)
11498
run: |
11599
tar xf targets.tar
116100
rm targets.tar
117101
118102
- id: release
119-
run: sbt ++${{ matrix.scala }} ci-release
103+
run: sbt ci-release

.github/workflows/clean.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20+
shell: bash {0}
2021
run: |
2122
# Customize those three lines with your repository and credentials:
2223
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -25,7 +26,7 @@ jobs:
2526
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2627
2728
# A temporary file which receives HTTP response headers.
28-
TMPFILE=/tmp/tmp.$$
29+
TMPFILE=$(mktemp)
2930
3031
# An associative array, key: artifact name, value: number of artifacts of that name.
3132
declare -A ARTCOUNT

.mergify.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ pull_request_rules:
22
- name: automatically merge Scala Steward PRs on CI success
33
conditions:
44
- author=scala-steward
5-
- status-success=Build and Test (ubuntu-latest, 3.0.1, [email protected])
6-
- body~=labels:.*semver-patch.*
5+
- status-success=Build and Test (ubuntu-latest, 3.6.4, zulu@8)
76
actions:
87
merge:
98
method: merge

.scalafmt.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
runner.dialect = scala3
22
runner.dialectOverride.allowSignificantIndentation = false
3-
version = "3.7.2"
3+
version = "3.9.4"
44
maxColumn = 140
55
align.preset = some
6-
align.tokens.add = [
6+
align.tokens."+" = [
77
{code = "<-", owner = Enumerator.Generator}
88
]
99
align.multiline = true

app/src/main/scala/com/kubukoz/next/Program.scala

-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import cats.effect.kernel.Ref
1111
import cats.effect.std.Console
1212
import cats.implicits.*
1313
import com.kubukoz.next.Spotify.DeviceInfo
14-
import com.kubukoz.next.Spotify.SonosInfo
1514
import com.kubukoz.next.api.sonos
1615
import com.kubukoz.next.sonos.SonosApi
1716
import com.kubukoz.next.sonos.SonosApiGen
@@ -36,8 +35,6 @@ import org.http4s.headers.`Content-Type`
3635
import org.typelevel.log4cats.Logger
3736
import smithy4s.http4s.SimpleRestJsonBuilder
3837

39-
import java.lang.System
40-
4138
import concurrent.duration.*
4239

4340
object Program {

build.sbt

+14-18
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inThisBuild(
1515
)
1616
Global / onChangedBuildSource := ReloadOnSourceChanges
1717

18-
ThisBuild / scalaVersion := "3.3.1"
18+
ThisBuild / scalaVersion := "3.6.4"
1919

2020
ThisBuild / githubWorkflowTargetTags := Seq("v*")
2121
ThisBuild / githubWorkflowPublishTargetBranches := List(RefPredicate.StartsWith(Ref.Tag("v")), RefPredicate.Equals(Ref.Branch("main")))
@@ -49,26 +49,22 @@ def crossPlugin(
4949
x: sbt.librarymanagement.ModuleID
5050
) = compilerPlugin(x.cross(CrossVersion.full))
5151

52-
val addCompilerPlugins = libraryDependencies ++= {
52+
val addCompilerPlugins = libraryDependencies ++=
5353
List(
5454
crossPlugin("org.polyvariant" % "better-tostring" % "0.3.17")
5555
)
56-
}
5756

5857
val commonSettings = Seq(
5958
scalacOptions -= "-Xfatal-warnings",
6059
scalacOptions ++= List(
61-
"-no-indent",
62-
"-rewrite",
63-
"-source",
64-
"future-migration"
60+
"-no-indent"
6561
// "-Ximport-suggestion-timeout",
6662
// "2000"
6763
),
6864
libraryDependencies ++= Seq(
69-
"org.typelevel" %%% "cats-effect" % "3.5.2",
70-
"org.scalameta" %%% "munit" % "1.0.0-M10" % Test,
71-
"org.typelevel" %%% "munit-cats-effect" % "2.0.0-M3" % Test
65+
"org.typelevel" %%% "cats-effect" % "3.5.7",
66+
"org.scalameta" %%% "munit" % "1.0.0" % Test,
67+
"org.typelevel" %%% "munit-cats-effect" % "2.0.0" % Test
7268
),
7369
addCompilerPlugins,
7470
Compile / doc / sources := Nil
@@ -126,14 +122,14 @@ val app = crossProject(JVMPlatform, NativePlatform)
126122
.settings(
127123
libraryDependencies ++= Seq(
128124
"com.disneystreaming.smithy4s" %%% "smithy4s-http4s" % smithy4sVersion.value,
129-
"org.typelevel" %%% "cats-mtl" % "1.3.1",
125+
"org.typelevel" %%% "cats-mtl" % "1.4.0",
130126
"com.monovore" %%% "decline-effect" % "2.4.1",
131-
"org.http4s" %%% "http4s-dsl" % "0.23.23",
132-
"org.http4s" %%% "http4s-ember-server" % "0.23.23",
133-
"org.http4s" %%% "http4s-ember-client" % "0.23.23",
134-
"org.http4s" %%% "http4s-circe" % "0.23.23",
135-
"io.circe" %%% "circe-parser" % "0.14.6",
136-
"org.typelevel" %%% "log4cats-noop" % "2.6.0",
127+
"org.http4s" %%% "http4s-dsl" % "0.23.30",
128+
"org.http4s" %%% "http4s-ember-server" % "0.23.30",
129+
"org.http4s" %%% "http4s-ember-client" % "0.23.30",
130+
"org.http4s" %%% "http4s-circe" % "0.23.30",
131+
"io.circe" %%% "circe-parser" % "0.14.8",
132+
"org.typelevel" %%% "log4cats-noop" % "2.7.0",
137133
"org.polyvariant" %%% "colorize" % "0.3.2"
138134
// waiting
139135
// "dev.optics" %%% "monocle-core" % "3.1.0"
@@ -150,7 +146,7 @@ val app = crossProject(JVMPlatform, NativePlatform)
150146
.jvmConfigure(
151147
_.settings(
152148
libraryDependencies ++= Seq(
153-
"ch.qos.logback" % "logback-classic" % "1.2.11"
149+
"ch.qos.logback" % "logback-classic" % "1.2.13"
154150
)
155151
).enablePlugins(JavaAppPackaging)
156152
)

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.9.6
1+
sbt.version=1.10.11

project/plugins.sbt

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
2-
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
3-
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
1+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.3")
2+
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
3+
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.11.1")
44

5-
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
6-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
5+
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
6+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.25.0")
77

8-
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.2")
9-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16")
8+
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.31")
9+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
1010
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
1111

1212
addDependencyTreePlugin

0 commit comments

Comments
 (0)