Skip to content

Commit 423ae26

Browse files
committed
sbt-typelevel 0.7.1
1 parent 2daeffb commit 423ae26

File tree

3 files changed

+112
-99
lines changed

3 files changed

+112
-99
lines changed

.github/workflows/ci.yml

Lines changed: 106 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -15,73 +15,59 @@ on:
1515
tags: [v*]
1616

1717
env:
18-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
19-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
20-
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
21-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
22-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
2318
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2419

20+
21+
concurrency:
22+
group: ${{ github.workflow }} @ ${{ github.ref }}
23+
cancel-in-progress: true
24+
2525
jobs:
2626
build:
2727
name: Build and Test
2828
strategy:
2929
matrix:
3030
os: [ubuntu-latest]
31-
scala: [2.12.17, 2.13.10, 3.3.3]
31+
scala: [2.12, 2.13, 3]
3232
java: [corretto@8]
3333
project: [rootJS, rootJVM, rootNative]
3434
include:
35-
- scala: 3.3.3
35+
- scala: 3
3636
java: corretto@8
3737
project: rootNative
3838
os: macos-latest
3939
exclude:
40-
- scala: 3.3.3
40+
- scala: 3
4141
project: rootJVM
42-
- scala: 3.3.3
42+
- scala: 3
4343
project: rootNative
4444
os: ubuntu-latest
4545
runs-on: ${{ matrix.os }}
46+
timeout-minutes: 60
4647
steps:
4748
- name: Checkout current branch (full)
48-
uses: actions/checkout@v2
49+
uses: actions/checkout@v4
4950
with:
5051
fetch-depth: 0
5152

52-
- name: Download Java (corretto@8)
53-
id: download-java-corretto-8
54-
if: matrix.java == 'corretto@8'
55-
uses: typelevel/download-java@v1
56-
with:
57-
distribution: corretto
58-
java-version: 8
59-
6053
- name: Setup Java (corretto@8)
54+
id: setup-java-corretto-8
6155
if: matrix.java == 'corretto@8'
62-
uses: actions/setup-java@v2
56+
uses: actions/setup-java@v4
6357
with:
64-
distribution: jdkfile
58+
distribution: corretto
6559
java-version: 8
66-
jdkFile: ${{ steps.download-java-corretto-8.outputs.jdkFile }}
60+
cache: sbt
6761

68-
- name: Cache sbt
69-
uses: actions/cache@v2
70-
with:
71-
path: |
72-
~/.sbt
73-
~/.ivy2/cache
74-
~/.coursier/cache/v1
75-
~/.cache/coursier/v1
76-
~/AppData/Local/Coursier/Cache/v1
77-
~/Library/Caches/Coursier/v1
78-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
62+
- name: sbt update
63+
if: matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
64+
run: ./sbt +update
7965

8066
- name: Check that workflows are up to date
8167
run: ./sbt githubWorkflowCheck
8268

8369
- name: Check formatting
84-
if: matrix.java == 'corretto@8'
70+
if: matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
8571
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' scalafmtCheckAll 'project /' scalafmtSbtCheck
8672

8773
- name: scalaJSLink
@@ -96,24 +82,24 @@ jobs:
9682
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
9783

9884
- name: Check binary compatibility
99-
if: matrix.java == 'corretto@8'
85+
if: matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
10086
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
10187

10288
- name: Generate API documentation
103-
if: matrix.java == 'corretto@8'
89+
if: matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
10490
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
10591

10692
- name: Make target directories
10793
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
108-
run: mkdir -p target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js/target project/target
94+
run: mkdir -p core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
10995

11096
- name: Compress target directories
11197
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
112-
run: tar cf targets.tar target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js/target project/target
98+
run: tar cf targets.tar core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
11399

114100
- name: Upload target directories
115101
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
116-
uses: actions/upload-artifact@v2
102+
uses: actions/upload-artifact@v4
117103
with:
118104
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
119105
path: targets.tar
@@ -125,123 +111,150 @@ jobs:
125111
strategy:
126112
matrix:
127113
os: [ubuntu-latest]
128-
scala: [2.13.10]
129114
java: [corretto@8]
130115
runs-on: ${{ matrix.os }}
131116
steps:
132117
- name: Checkout current branch (full)
133-
uses: actions/checkout@v2
118+
uses: actions/checkout@v4
134119
with:
135120
fetch-depth: 0
136121

137-
- name: Download Java (corretto@8)
138-
id: download-java-corretto-8
122+
- name: Setup Java (corretto@8)
123+
id: setup-java-corretto-8
139124
if: matrix.java == 'corretto@8'
140-
uses: typelevel/download-java@v1
125+
uses: actions/setup-java@v4
141126
with:
142127
distribution: corretto
143128
java-version: 8
129+
cache: sbt
144130

145-
- name: Setup Java (corretto@8)
146-
if: matrix.java == 'corretto@8'
147-
uses: actions/setup-java@v2
148-
with:
149-
distribution: jdkfile
150-
java-version: 8
151-
jdkFile: ${{ steps.download-java-corretto-8.outputs.jdkFile }}
131+
- name: sbt update
132+
if: matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
133+
run: ./sbt +update
152134

153-
- name: Cache sbt
154-
uses: actions/cache@v2
155-
with:
156-
path: |
157-
~/.sbt
158-
~/.ivy2/cache
159-
~/.coursier/cache/v1
160-
~/.cache/coursier/v1
161-
~/AppData/Local/Coursier/Cache/v1
162-
~/Library/Caches/Coursier/v1
163-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
164-
165-
- name: Download target directories (2.12.17, rootJS)
166-
uses: actions/download-artifact@v2
135+
- name: Download target directories (2.12, rootJS)
136+
uses: actions/download-artifact@v4
167137
with:
168-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJS
138+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
169139

170-
- name: Inflate target directories (2.12.17, rootJS)
140+
- name: Inflate target directories (2.12, rootJS)
171141
run: |
172142
tar xf targets.tar
173143
rm targets.tar
174144
175-
- name: Download target directories (2.12.17, rootJVM)
176-
uses: actions/download-artifact@v2
145+
- name: Download target directories (2.12, rootJVM)
146+
uses: actions/download-artifact@v4
177147
with:
178-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJVM
148+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
179149

180-
- name: Inflate target directories (2.12.17, rootJVM)
150+
- name: Inflate target directories (2.12, rootJVM)
181151
run: |
182152
tar xf targets.tar
183153
rm targets.tar
184154
185-
- name: Download target directories (2.12.17, rootNative)
186-
uses: actions/download-artifact@v2
155+
- name: Download target directories (2.12, rootNative)
156+
uses: actions/download-artifact@v4
187157
with:
188-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootNative
158+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
189159

190-
- name: Inflate target directories (2.12.17, rootNative)
160+
- name: Inflate target directories (2.12, rootNative)
191161
run: |
192162
tar xf targets.tar
193163
rm targets.tar
194164
195-
- name: Download target directories (2.13.10, rootJS)
196-
uses: actions/download-artifact@v2
165+
- name: Download target directories (2.13, rootJS)
166+
uses: actions/download-artifact@v4
197167
with:
198-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJS
168+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
199169

200-
- name: Inflate target directories (2.13.10, rootJS)
170+
- name: Inflate target directories (2.13, rootJS)
201171
run: |
202172
tar xf targets.tar
203173
rm targets.tar
204174
205-
- name: Download target directories (2.13.10, rootJVM)
206-
uses: actions/download-artifact@v2
175+
- name: Download target directories (2.13, rootJVM)
176+
uses: actions/download-artifact@v4
207177
with:
208-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM
178+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
209179

210-
- name: Inflate target directories (2.13.10, rootJVM)
180+
- name: Inflate target directories (2.13, rootJVM)
211181
run: |
212182
tar xf targets.tar
213183
rm targets.tar
214184
215-
- name: Download target directories (2.13.10, rootNative)
216-
uses: actions/download-artifact@v2
185+
- name: Download target directories (2.13, rootNative)
186+
uses: actions/download-artifact@v4
217187
with:
218-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootNative
188+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
219189

220-
- name: Inflate target directories (2.13.10, rootNative)
190+
- name: Inflate target directories (2.13, rootNative)
221191
run: |
222192
tar xf targets.tar
223193
rm targets.tar
224194
225-
- name: Download target directories (3.3.3, rootJS)
226-
uses: actions/download-artifact@v2
195+
- name: Download target directories (3, rootJS)
196+
uses: actions/download-artifact@v4
227197
with:
228-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.3-rootJS
198+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
229199

230-
- name: Inflate target directories (3.3.3, rootJS)
200+
- name: Inflate target directories (3, rootJS)
231201
run: |
232202
tar xf targets.tar
233203
rm targets.tar
234204
235205
- name: Import signing key
236206
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
237-
run: echo $PGP_SECRET | base64 -di | gpg --import
207+
env:
208+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
209+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
210+
run: echo $PGP_SECRET | base64 -d -i - | gpg --import
238211

239212
- name: Import signing key and strip passphrase
240213
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
214+
env:
215+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
216+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
241217
run: |
242-
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
218+
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
243219
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
244220
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
245221
246222
- name: Publish
247-
run: ./sbt '++ ${{ matrix.scala }}' tlRelease
223+
env:
224+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
225+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
226+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
227+
run: ./sbt tlCiRelease
228+
229+
dependency-submission:
230+
name: Submit Dependencies
231+
if: github.event_name != 'pull_request'
232+
strategy:
233+
matrix:
234+
os: [ubuntu-latest]
235+
java: [corretto@8]
236+
runs-on: ${{ matrix.os }}
237+
steps:
238+
- name: Checkout current branch (full)
239+
uses: actions/checkout@v4
240+
with:
241+
fetch-depth: 0
242+
243+
- name: Setup Java (corretto@8)
244+
id: setup-java-corretto-8
245+
if: matrix.java == 'corretto@8'
246+
uses: actions/setup-java@v4
247+
with:
248+
distribution: corretto
249+
java-version: 8
250+
cache: sbt
251+
252+
- name: sbt update
253+
if: matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
254+
run: ./sbt +update
255+
256+
- name: Submit Dependencies
257+
uses: scalacenter/sbt-dependency-submission@v2
258+
with:
259+
modules-ignore: rootjs_2.12 rootjs_2.13 rootjs_3 tests_sjs1_2.12 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 demo_2.12 demo_2.13 demo_3 tests_2.12 tests_2.13 tests_3 demo_native0.4_2.12 demo_native0.4_2.13 demo_native0.4_3 tests_native0.4_2.12 tests_native0.4_2.13 tests_native0.4_3 demo_sjs1_2.12 demo_sjs1_2.13 demo_sjs1_3
260+
configs-ignore: test scala-tool scala-doc-tool test-internal

build.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val scala213 = "2.13.10"
1+
val scala213 = "2.13.14"
22
val scala3 = "3.3.3"
33
ThisBuild / scalaVersion := scala213
44
ThisBuild / crossScalaVersions := Seq("2.12.17", scala213, scala3)
@@ -11,14 +11,14 @@ ThisBuild / githubWorkflowJavaVersions := Seq(javaDistro)
1111
ThisBuild / githubWorkflowSbtCommand := "./sbt"
1212

1313
ThisBuild / githubWorkflowBuildMatrixExclusions ++= Seq(
14-
MatrixExclude(Map("scala" -> scala3, "project" -> "rootJVM")), // TODO
14+
MatrixExclude(Map("scala" -> "3", "project" -> "rootJVM")), // TODO
1515
MatrixExclude(
16-
Map("scala" -> scala3, "project" -> "rootNative", "os" -> "ubuntu-latest")
16+
Map("scala" -> "3", "project" -> "rootNative", "os" -> "ubuntu-latest")
1717
) // run on macOS instead
1818
)
1919

2020
ThisBuild / githubWorkflowBuildMatrixInclusions +=
21-
MatrixInclude(Map("scala" -> scala3, "java" -> javaDistro.render, "project" -> "rootNative"),
21+
MatrixInclude(Map("scala" -> "3", "java" -> javaDistro.render, "project" -> "rootNative"),
2222
Map("os" -> "macos-latest")
2323
)
2424

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "1.2.0")
22

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
44

55
addSbtPlugin("io.github.cquiroz" % "sbt-tzdb" % "4.2.0")
66

7-
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.17")
7+
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.1")
88

99
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
1010

0 commit comments

Comments
 (0)