Skip to content

Commit 00b78ba

Browse files
committed
change ci
1 parent 3c51500 commit 00b78ba

File tree

4 files changed

+21
-41
lines changed

4 files changed

+21
-41
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,31 @@ 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]
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 +update
53-
5443
- name: Check that workflows are up to date
55-
run: sbt githubWorkflowCheck
44+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
5645

5746
- name: Scala 2.13 build
5847
if: startsWith(matrix.scala, '2.13')
@@ -62,19 +51,13 @@ jobs:
6251
if: '!startsWith(matrix.scala, ''2.13'')'
6352
run: sbt '++ ${{ matrix.scala }}' test
6453

65-
- name: Make target directories
66-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/1.5' || startsWith(github.ref, 'refs/tags/v'))
67-
run: mkdir -p target project/target
68-
6954
- name: Compress target directories
70-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/1.5' || startsWith(github.ref, 'refs/tags/v'))
7155
run: tar cf targets.tar target project/target
7256

7357
- name: Upload target directories
74-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/1.5' || startsWith(github.ref, 'refs/tags/v'))
7558
uses: actions/upload-artifact@v3
7659
with:
77-
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
60+
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
7861
path: targets.tar
7962

8063
publish:
@@ -84,6 +67,7 @@ jobs:
8467
strategy:
8568
matrix:
8669
os: [ubuntu-latest]
70+
scala: [2.13.12]
8771
java: [zulu@8]
8872
runs-on: ${{ matrix.os }}
8973
steps:
@@ -93,54 +77,49 @@ jobs:
9377
fetch-depth: 0
9478

9579
- name: Setup Java (zulu@8)
96-
id: setup-java-zulu-8
9780
if: matrix.java == 'zulu@8'
9881
uses: actions/setup-java@v3
9982
with:
10083
distribution: zulu
10184
java-version: 8
10285
cache: sbt
10386

104-
- name: sbt update
105-
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
106-
run: sbt +update
107-
108-
- name: Download target directories (2.11)
87+
- name: Download target directories (2.11.12)
10988
uses: actions/download-artifact@v3
11089
with:
111-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.11
90+
name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
11291

113-
- name: Inflate target directories (2.11)
92+
- name: Inflate target directories (2.11.12)
11493
run: |
11594
tar xf targets.tar
11695
rm targets.tar
11796
118-
- name: Download target directories (2.12)
97+
- name: Download target directories (2.12.18)
11998
uses: actions/download-artifact@v3
12099
with:
121-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12
100+
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
122101

123-
- name: Inflate target directories (2.12)
102+
- name: Inflate target directories (2.12.18)
124103
run: |
125104
tar xf targets.tar
126105
rm targets.tar
127106
128-
- name: Download target directories (2.13)
107+
- name: Download target directories (2.13.12)
129108
uses: actions/download-artifact@v3
130109
with:
131-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
110+
name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }}
132111

133-
- name: Inflate target directories (2.13)
112+
- name: Inflate target directories (2.13.12)
134113
run: |
135114
tar xf targets.tar
136115
rm targets.tar
137116
138-
- name: Download target directories (3)
117+
- name: Download target directories (3.3.1)
139118
uses: actions/download-artifact@v3
140119
with:
141-
name: target-${{ matrix.os }}-${{ matrix.java }}-3
120+
name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }}
142121

143-
- name: Inflate target directories (3)
122+
- name: Inflate target directories (3.3.1)
144123
run: |
145124
tar xf targets.tar
146125
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
@@ -2,7 +2,7 @@
22
import xml.Group
33
import sbt._
44
import Keys._
5-
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
5+
import sbtghactions.JavaSpec.Distribution.Zulu
66

77
organization := "com.github.swagger-akka-http"
88

@@ -131,14 +131,14 @@ pomExtra := {
131131

132132
MetaInfLicenseCopy.settings
133133

134-
ThisBuild / tlSonatypeUseLegacyHost := true
135134
ThisBuild / githubWorkflowBuild := Seq(
136135
WorkflowStep
137136
.Sbt(List("coverage", "test", "coverageReport"), name = Some("Scala 2.13 build"), cond = Some("startsWith(matrix.scala, '2.13')")),
138137
WorkflowStep.Sbt(List("test"), name = Some("Scala build"), cond = Some("!startsWith(matrix.scala, '2.13')"))
139138
)
140139

141140
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"))
141+
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
142142
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
143143
RefPredicate.Equals(Ref.Branch("develop")),
144144
RefPredicate.Equals(Ref.Branch("1.5")),

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
22

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

55
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
66

0 commit comments

Comments
 (0)