Sitelet https://github.com/satorg/typelevel.discipline/commit/46c123d43fd88b7bbf19c333a622076532ceecc1
Skip to content

Commit 46c123d

Browse files
committed
Fix the build
1 parent 836b919 commit 46c123d

8 files changed

Lines changed: 150 additions & 105 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 108 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,42 @@ 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.2.1]
31+
scala: [2.12, 2.13, 3]
3232
java: [temurin@8]
3333
project: [rootJS, rootJVM, rootNative]
3434
runs-on: ${{ matrix.os }}
35+
timeout-minutes: 60
3536
steps:
3637
- name: Checkout current branch (full)
37-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3839
with:
3940
fetch-depth: 0
4041

41-
- name: Download Java (temurin@8)
42-
id: download-java-temurin-8
43-
if: matrix.java == 'temurin@8'
44-
uses: typelevel/download-java@v2
45-
with:
46-
distribution: temurin
47-
java-version: 8
48-
4942
- name: Setup Java (temurin@8)
43+
id: setup-java-temurin-8
5044
if: matrix.java == 'temurin@8'
51-
uses: actions/setup-java@v3
45+
uses: actions/setup-java@v4
5246
with:
53-
distribution: jdkfile
47+
distribution: temurin
5448
java-version: 8
55-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
49+
cache: sbt
5650

57-
- name: Cache sbt
58-
uses: actions/cache@v3
59-
with:
60-
path: |
61-
~/.sbt
62-
~/.ivy2/cache
63-
~/.coursier/cache/v1
64-
~/.cache/coursier/v1
65-
~/AppData/Local/Coursier/Cache/v1
66-
~/Library/Caches/Coursier/v1
67-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
51+
- name: sbt update
52+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
53+
run: sbt +update
6854

6955
- name: Check that workflows are up to date
7056
run: sbt githubWorkflowCheck
@@ -94,15 +80,15 @@ jobs:
9480

9581
- name: Make target directories
9682
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
97-
run: mkdir -p target .js/target core/.native/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
83+
run: mkdir -p core/.native/target core/.js/target core/.jvm/target project/target
9884

9985
- name: Compress target directories
10086
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
101-
run: tar cf targets.tar target .js/target core/.native/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
87+
run: tar cf targets.tar core/.native/target core/.js/target core/.jvm/target project/target
10288

10389
- name: Upload target directories
10490
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
105-
uses: actions/upload-artifact@v3
91+
uses: actions/upload-artifact@v4
10692
with:
10793
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
10894
path: targets.tar
@@ -114,143 +100,170 @@ jobs:
114100
strategy:
115101
matrix:
116102
os: [ubuntu-latest]
117-
scala: [3.2.1]
118103
java: [temurin@8]
119104
runs-on: ${{ matrix.os }}
120105
steps:
121106
- name: Checkout current branch (full)
122-
uses: actions/checkout@v3
107+
uses: actions/checkout@v4
123108
with:
124109
fetch-depth: 0
125110

126-
- name: Download Java (temurin@8)
127-
id: download-java-temurin-8
111+
- name: Setup Java (temurin@8)
112+
id: setup-java-temurin-8
128113
if: matrix.java == 'temurin@8'
129-
uses: typelevel/download-java@v2
114+
uses: actions/setup-java@v4
130115
with:
131116
distribution: temurin
132117
java-version: 8
118+
cache: sbt
133119

134-
- name: Setup Java (temurin@8)
135-
if: matrix.java == 'temurin@8'
136-
uses: actions/setup-java@v3
137-
with:
138-
distribution: jdkfile
139-
java-version: 8
140-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
120+
- name: sbt update
121+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
122+
run: sbt +update
141123

142-
- name: Cache sbt
143-
uses: actions/cache@v3
144-
with:
145-
path: |
146-
~/.sbt
147-
~/.ivy2/cache
148-
~/.coursier/cache/v1
149-
~/.cache/coursier/v1
150-
~/AppData/Local/Coursier/Cache/v1
151-
~/Library/Caches/Coursier/v1
152-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
153-
154-
- name: Download target directories (2.12.17, rootJS)
155-
uses: actions/download-artifact@v3
124+
- name: Download target directories (2.12, rootJS)
125+
uses: actions/download-artifact@v4
156126
with:
157-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJS
127+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
158128

159-
- name: Inflate target directories (2.12.17, rootJS)
129+
- name: Inflate target directories (2.12, rootJS)
160130
run: |
161131
tar xf targets.tar
162132
rm targets.tar
163133
164-
- name: Download target directories (2.12.17, rootJVM)
165-
uses: actions/download-artifact@v3
134+
- name: Download target directories (2.12, rootJVM)
135+
uses: actions/download-artifact@v4
166136
with:
167-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJVM
137+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
168138

169-
- name: Inflate target directories (2.12.17, rootJVM)
139+
- name: Inflate target directories (2.12, rootJVM)
170140
run: |
171141
tar xf targets.tar
172142
rm targets.tar
173143
174-
- name: Download target directories (2.12.17, rootNative)
175-
uses: actions/download-artifact@v3
144+
- name: Download target directories (2.12, rootNative)
145+
uses: actions/download-artifact@v4
176146
with:
177-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootNative
147+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
178148

179-
- name: Inflate target directories (2.12.17, rootNative)
149+
- name: Inflate target directories (2.12, rootNative)
180150
run: |
181151
tar xf targets.tar
182152
rm targets.tar
183153
184-
- name: Download target directories (2.13.10, rootJS)
185-
uses: actions/download-artifact@v3
154+
- name: Download target directories (2.13, rootJS)
155+
uses: actions/download-artifact@v4
186156
with:
187-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJS
157+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
188158

189-
- name: Inflate target directories (2.13.10, rootJS)
159+
- name: Inflate target directories (2.13, rootJS)
190160
run: |
191161
tar xf targets.tar
192162
rm targets.tar
193163
194-
- name: Download target directories (2.13.10, rootJVM)
195-
uses: actions/download-artifact@v3
164+
- name: Download target directories (2.13, rootJVM)
165+
uses: actions/download-artifact@v4
196166
with:
197-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM
167+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
198168

199-
- name: Inflate target directories (2.13.10, rootJVM)
169+
- name: Inflate target directories (2.13, rootJVM)
200170
run: |
201171
tar xf targets.tar
202172
rm targets.tar
203173
204-
- name: Download target directories (2.13.10, rootNative)
205-
uses: actions/download-artifact@v3
174+
- name: Download target directories (2.13, rootNative)
175+
uses: actions/download-artifact@v4
206176
with:
207-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootNative
177+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
208178

209-
- name: Inflate target directories (2.13.10, rootNative)
179+
- name: Inflate target directories (2.13, rootNative)
210180
run: |
211181
tar xf targets.tar
212182
rm targets.tar
213183
214-
- name: Download target directories (3.2.1, rootJS)
215-
uses: actions/download-artifact@v3
184+
- name: Download target directories (3, rootJS)
185+
uses: actions/download-artifact@v4
216186
with:
217-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1-rootJS
187+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
218188

219-
- name: Inflate target directories (3.2.1, rootJS)
189+
- name: Inflate target directories (3, rootJS)
220190
run: |
221191
tar xf targets.tar
222192
rm targets.tar
223193
224-
- name: Download target directories (3.2.1, rootJVM)
225-
uses: actions/download-artifact@v3
194+
- name: Download target directories (3, rootJVM)
195+
uses: actions/download-artifact@v4
226196
with:
227-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1-rootJVM
197+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
228198

229-
- name: Inflate target directories (3.2.1, rootJVM)
199+
- name: Inflate target directories (3, rootJVM)
230200
run: |
231201
tar xf targets.tar
232202
rm targets.tar
233203
234-
- name: Download target directories (3.2.1, rootNative)
235-
uses: actions/download-artifact@v3
204+
- name: Download target directories (3, rootNative)
205+
uses: actions/download-artifact@v4
236206
with:
237-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1-rootNative
207+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
238208

239-
- name: Inflate target directories (3.2.1, rootNative)
209+
- name: Inflate target directories (3, rootNative)
240210
run: |
241211
tar xf targets.tar
242212
rm targets.tar
243213
244214
- name: Import signing key
245215
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
246-
run: echo $PGP_SECRET | base64 -di | gpg --import
216+
env:
217+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
218+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
219+
run: echo $PGP_SECRET | base64 -d -i - | gpg --import
247220

248221
- name: Import signing key and strip passphrase
249222
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
223+
env:
224+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
225+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
250226
run: |
251-
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
227+
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
252228
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
253229
(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)
254230
255231
- name: Publish
256-
run: sbt '++ ${{ matrix.scala }}' tlCiRelease
232+
env:
233+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
234+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
235+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
236+
run: sbt tlCiRelease
237+
238+
dependency-submission:
239+
name: Submit Dependencies
240+
if: github.event_name != 'pull_request'
241+
strategy:
242+
matrix:
243+
os: [ubuntu-latest]
244+
java: [temurin@8]
245+
runs-on: ${{ matrix.os }}
246+
steps:
247+
- name: Checkout current branch (full)
248+
uses: actions/checkout@v4
249+
with:
250+
fetch-depth: 0
251+
252+
- name: Setup Java (temurin@8)
253+
id: setup-java-temurin-8
254+
if: matrix.java == 'temurin@8'
255+
uses: actions/setup-java@v4
256+
with:
257+
distribution: temurin
258+
java-version: 8
259+
cache: sbt
260+
261+
- name: sbt update
262+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
263+
run: sbt +update
264+
265+
- name: Submit Dependencies
266+
uses: scalacenter/sbt-dependency-submission@v2
267+
with:
268+
modules-ignore: discipline_2.12 discipline_2.13 discipline_3 discipline_2.12 discipline_2.13 discipline_3 discipline_2.12 discipline_2.13 discipline_3
269+
configs-ignore: test scala-tool scala-doc-tool test-internal

‎.mergify.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file was automatically generated by sbt-typelevel-mergify using the
2+
# mergifyGenerate task. You should add and commit this file to
3+
# your git repository. It goes without saying that you shouldn't edit
4+
# this file by hand! Instead, if you wish to make changes, you should
5+
# change your sbt build configuration to revise the mergify configuration
6+
# to meet your needs, then regenerate this file.
7+
8+
pull_request_rules:
9+
- name: merge scala-steward's PRs
10+
conditions:
11+
- author=scala-steward
12+
- body~=labels:.*early-semver-patch
13+
- status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, rootJS)
14+
- status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, rootJVM)
15+
- status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, rootNative)
16+
- status-success=Build and Test (ubuntu-latest, 2.13, temurin@8, rootJS)
17+
- status-success=Build and Test (ubuntu-latest, 2.13, temurin@8, rootJVM)
18+
- status-success=Build and Test (ubuntu-latest, 2.13, temurin@8, rootNative)
19+
- status-success=Build and Test (ubuntu-latest, 3, temurin@8, rootJS)
20+
- status-success=Build and Test (ubuntu-latest, 3, temurin@8, rootJVM)
21+
- status-success=Build and Test (ubuntu-latest, 3, temurin@8, rootNative)
22+
actions:
23+
merge: {}
24+
- name: Label core PRs
25+
conditions:
26+
- files~=^core/
27+
actions:
28+
label:
29+
add:
30+
- core
31+
remove: []

‎.scalafmt.conf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.7.0
1+
version = 3.7.17
22

33
runner.dialect = Scala213Source3
44

‎build.sbt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ThisBuild / developers := List(
44
tlGitHubDev("larsrh", "Lars Hupel")
55
)
66

7-
ThisBuild / crossScalaVersions := Seq("2.12.17", "2.13.10", "3.2.1")
7+
ThisBuild / crossScalaVersions := Seq("2.12.17", "2.13.13", "3.3.3")
88
ThisBuild / tlVersionIntroduced := Map("3" -> "1.1.5")
99

1010
ThisBuild / licenses := Seq("MIT" -> url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fsatorg%2Ftypelevel.discipline%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttps%3A%2F%2Fopensource.org%2Flicenses%2FMIT%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E))

‎core/src/main/scala/org/typelevel/discipline/Laws.scala‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ trait Laws {
8383
def props: Seq[(String, Prop)]
8484

8585
private def collectParentProps: SortedMap[String, Prop] =
86-
SortedMap(props: _*) ++ parents.flatMap(_.collectParentProps)
86+
SortedMap(props*) ++ parents.flatMap(_.collectParentProps)
8787

8888
/**
8989
* Assembles all properties. For the rules, see [[RuleSet]].
@@ -119,7 +119,7 @@ trait Laws {
119119
class SimpleRuleSet(
120120
name: String,
121121
props: (String, Prop)*
122-
) extends DefaultRuleSet(name, None, props: _*)
122+
) extends DefaultRuleSet(name, None, props*)
123123

124124
/**
125125
* Empty rule set.

‎core/src/test/scala/org/typelevel/discipline/laws.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ trait GroupLaws extends Laws {
7474
name: String,
7575
parent: Option[RuleSet],
7676
props: (String, Prop)*
77-
) extends DefaultRuleSet(name, parent, props: _*)
77+
) extends DefaultRuleSet(name, parent, props*)
7878

7979
class AdditiveProperties(
8080
val base: GroupProperties,

0 commit comments

Comments
 (0)