Skip to content

Commit b395de0

Browse files
committed
change ci
1 parent eed0727 commit b395de0

File tree

5 files changed

+22
-67
lines changed

5 files changed

+22
-67
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -17,85 +17,58 @@ 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
- name: Build project
8463
run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test
8564

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

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

10174
publish:
@@ -105,6 +78,7 @@ jobs:
10578
strategy:
10679
matrix:
10780
os: [ubuntu-latest]
81+
scala: [2.13.12]
10882
java: [zulu@8]
10983
runs-on: ${{ matrix.os }}
11084
steps:
@@ -114,80 +88,65 @@ jobs:
11488
fetch-depth: 0
11589

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

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

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

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

160-
- name: Inflate target directories (2.11)
119+
- name: Inflate target directories (2.11.12)
161120
run: |
162121
tar xf targets.tar
163122
rm targets.tar
164123
165-
- name: Download target directories (2.12)
124+
- name: Download target directories (2.12.18)
166125
uses: actions/download-artifact@v3
167126
with:
168-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12
127+
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
169128

170-
- name: Inflate target directories (2.12)
129+
- name: Inflate target directories (2.12.18)
171130
run: |
172131
tar xf targets.tar
173132
rm targets.tar
174133
175-
- name: Download target directories (2.13)
134+
- name: Download target directories (2.13.12)
176135
uses: actions/download-artifact@v3
177136
with:
178-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
137+
name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }}
179138

180-
- name: Inflate target directories (2.13)
139+
- name: Inflate target directories (2.13.12)
181140
run: |
182141
tar xf targets.tar
183142
rm targets.tar
184143
185-
- name: Download target directories (3)
144+
- name: Download target directories (3.3.1)
186145
uses: actions/download-artifact@v3
187146
with:
188-
name: target-${{ matrix.os }}-${{ matrix.java }}-3
147+
name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }}
189148

190-
- name: Inflate target directories (3)
149+
- name: Inflate target directories (3.3.1)
191150
run: |
192151
tar xf targets.tar
193152
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import java.io.File
2-
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
1+
import sbtghactions.JavaSpec.Distribution.Zulu
32

43
// Basic facts
54
name := "jackson-module-scala"
@@ -140,9 +139,8 @@ Compile / resourceGenerators += Def.task {
140139

141140
Test / parallelExecution := false
142141

143-
ThisBuild / tlSonatypeUseLegacyHost := false
144142
ThisBuild / githubWorkflowSbtCommand := "sbt -J-Xmx2G"
145-
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"), JavaSpec(Zulu, "11"), JavaSpec(Zulu, "17"))
143+
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
146144
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
147145
RefPredicate.Equals(Ref.Branch("master")),
148146
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)