Skip to content

Commit 295a8a7

Browse files
committed
change ci
1 parent fb96884 commit 295a8a7

File tree

5 files changed

+22
-65
lines changed

5 files changed

+22
-65
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -17,84 +17,57 @@ on:
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919

20-
21-
concurrency:
22-
group: ${{ github.workflow }} @ ${{ github.ref }}
23-
cancel-in-progress: true
24-
2520
jobs:
2621
build:
2722
name: Build and Test
2823
strategy:
2924
matrix:
3025
os: [ubuntu-latest]
31-
scala: [2.11, 2.12, 2.13, 3]
26+
scala: [2.11.12, 2.12.18, 2.13.12, 3.3.1]
3227
java: [zulu@8, zulu@11, zulu@17]
3328
runs-on: ${{ matrix.os }}
34-
timeout-minutes: 60
3529
steps:
3630
- name: Checkout current branch (full)
3731
uses: actions/checkout@v4
3832
with:
3933
fetch-depth: 0
4034

4135
- name: Setup Java (zulu@8)
42-
id: setup-java-zulu-8
4336
if: matrix.java == 'zulu@8'
4437
uses: actions/setup-java@v3
4538
with:
4639
distribution: zulu
4740
java-version: 8
4841
cache: sbt
4942

50-
- name: sbt update
51-
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
52-
run: sbt -J-Xmx2G +update
53-
5443
- name: Setup Java (zulu@11)
55-
id: setup-java-zulu-11
5644
if: matrix.java == 'zulu@11'
5745
uses: actions/setup-java@v3
5846
with:
5947
distribution: zulu
6048
java-version: 11
6149
cache: sbt
6250

63-
- name: sbt update
64-
if: matrix.java == 'zulu@11' && steps.setup-java-zulu-11.outputs.cache-hit == 'false'
65-
run: sbt -J-Xmx2G +update
66-
6751
- name: Setup Java (zulu@17)
68-
id: setup-java-zulu-17
6952
if: matrix.java == 'zulu@17'
7053
uses: actions/setup-java@v3
7154
with:
7255
distribution: zulu
7356
java-version: 17
7457
cache: sbt
7558

76-
- name: sbt update
77-
if: matrix.java == 'zulu@17' && steps.setup-java-zulu-17.outputs.cache-hit == 'false'
78-
run: sbt -J-Xmx2G +update
79-
8059
- name: Check that workflows are up to date
81-
run: sbt -J-Xmx2G githubWorkflowCheck
60+
run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' githubWorkflowCheck
8261

8362
- run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test mimaReportBinaryIssues
8463

85-
- name: Make target directories
86-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
87-
run: mkdir -p target project/target
88-
8964
- name: Compress target directories
90-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
9165
run: tar cf targets.tar target project/target
9266

9367
- name: Upload target directories
94-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
9568
uses: actions/upload-artifact@v3
9669
with:
97-
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
70+
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
9871
path: targets.tar
9972

10073
publish:
@@ -104,6 +77,7 @@ jobs:
10477
strategy:
10578
matrix:
10679
os: [ubuntu-latest]
80+
scala: [2.13.12]
10781
java: [zulu@8]
10882
runs-on: ${{ matrix.os }}
10983
steps:
@@ -113,80 +87,65 @@ jobs:
11387
fetch-depth: 0
11488

11589
- name: Setup Java (zulu@8)
116-
id: setup-java-zulu-8
11790
if: matrix.java == 'zulu@8'
11891
uses: actions/setup-java@v3
11992
with:
12093
distribution: zulu
12194
java-version: 8
12295
cache: sbt
12396

124-
- name: sbt update
125-
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
126-
run: sbt -J-Xmx2G +update
127-
12897
- name: Setup Java (zulu@11)
129-
id: setup-java-zulu-11
13098
if: matrix.java == 'zulu@11'
13199
uses: actions/setup-java@v3
132100
with:
133101
distribution: zulu
134102
java-version: 11
135103
cache: sbt
136104

137-
- name: sbt update
138-
if: matrix.java == 'zulu@11' && steps.setup-java-zulu-11.outputs.cache-hit == 'false'
139-
run: sbt -J-Xmx2G +update
140-
141105
- name: Setup Java (zulu@17)
142-
id: setup-java-zulu-17
143106
if: matrix.java == 'zulu@17'
144107
uses: actions/setup-java@v3
145108
with:
146109
distribution: zulu
147110
java-version: 17
148111
cache: sbt
149112

150-
- name: sbt update
151-
if: matrix.java == 'zulu@17' && steps.setup-java-zulu-17.outputs.cache-hit == 'false'
152-
run: sbt -J-Xmx2G +update
153-
154-
- name: Download target directories (2.11)
113+
- name: Download target directories (2.11.12)
155114
uses: actions/download-artifact@v3
156115
with:
157-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.11
116+
name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
158117

159-
- name: Inflate target directories (2.11)
118+
- name: Inflate target directories (2.11.12)
160119
run: |
161120
tar xf targets.tar
162121
rm targets.tar
163122
164-
- name: Download target directories (2.12)
123+
- name: Download target directories (2.12.18)
165124
uses: actions/download-artifact@v3
166125
with:
167-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12
126+
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
168127

169-
- name: Inflate target directories (2.12)
128+
- name: Inflate target directories (2.12.18)
170129
run: |
171130
tar xf targets.tar
172131
rm targets.tar
173132
174-
- name: Download target directories (2.13)
133+
- name: Download target directories (2.13.12)
175134
uses: actions/download-artifact@v3
176135
with:
177-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
136+
name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }}
178137

179-
- name: Inflate target directories (2.13)
138+
- name: Inflate target directories (2.13.12)
180139
run: |
181140
tar xf targets.tar
182141
rm targets.tar
183142
184-
- name: Download target directories (3)
143+
- name: Download target directories (3.3.1)
185144
uses: actions/download-artifact@v3
186145
with:
187-
name: target-${{ matrix.os }}-${{ matrix.java }}-3
146+
name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }}
188147

189-
- name: Inflate target directories (3)
148+
- name: Inflate target directories (3.3.1)
190149
run: |
191150
tar xf targets.tar
192151
rm targets.tar

.github/workflows/clean.yml

Lines changed: 2 additions & 1 deletion
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

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import com.typesafe.tools.mima.core._
2-
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
2+
import sbtghactions.JavaSpec.Distribution.Zulu
33

44
// Basic facts
55
name := "jackson-module-scala"
@@ -138,10 +138,10 @@ Compile / resourceGenerators += Def.task {
138138

139139
Test / parallelExecution := false
140140

141-
ThisBuild / tlSonatypeUseLegacyHost := true
142141
ThisBuild / githubWorkflowSbtCommand := "sbt -J-Xmx2G"
143142
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"), JavaSpec(Zulu, "11"), JavaSpec(Zulu, "17"))
144143
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "mimaReportBinaryIssues")))
144+
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
145145
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
146146
RefPredicate.Equals(Ref.Branch("master")),
147147
RefPredicate.StartsWith(Ref.Branch("2.")),

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.9.6
1+
sbt.version=1.9.7

project/plugins.sbt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0")
88

99
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
1010

11-
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.4")
11+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0")
1212

1313
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
14-
15-
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
16-

0 commit comments

Comments
 (0)