Skip to content

Commit 1342ac3

Browse files
committed
rework ci
1 parent 7d5000e commit 1342ac3

File tree

3 files changed

+133
-7
lines changed

3 files changed

+133
-7
lines changed

.github/workflows/ci.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ name: Continuous Integration
99

1010
on:
1111
pull_request:
12-
branches: ['**']
12+
branches: ['2.*']
1313
push:
14-
branches: ['**']
14+
branches: ['2.*']
1515
tags: [v*]
1616

1717
env:
@@ -64,9 +64,6 @@ jobs:
6464
java-version: 21
6565
cache: sbt
6666

67-
- name: Check that workflows are up to date
68-
run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' githubWorkflowCheck
69-
7067
- run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test mimaReportBinaryIssues
7168

7269
- name: Compress target directories
@@ -81,7 +78,7 @@ jobs:
8178
publish:
8279
name: Publish Artifacts
8380
needs: [build]
84-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
81+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/heads/2.') || startsWith(github.ref, 'refs/tags/v'))
8582
strategy:
8683
matrix:
8784
os: [ubuntu-latest]

.github/workflows/ci3.yml

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# This file was automatically generated by sbt-github-actions using the
2+
# githubWorkflowGenerate 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 workflow description
6+
# to meet your needs, then regenerate this file.
7+
8+
name: Continuous Integration
9+
10+
on:
11+
pull_request:
12+
branches: ['master']
13+
push:
14+
branches: ['master']
15+
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
jobs:
20+
build:
21+
name: Build and Test
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest]
25+
scala: [2.11.12, 2.12.20, 2.13.15, 3.3.4]
26+
java: [zulu@17, zulu@21]
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout current branch (full)
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Setup Java (zulu@17)
35+
if: matrix.java == 'zulu@17'
36+
uses: actions/setup-java@v4
37+
with:
38+
distribution: zulu
39+
java-version: 17
40+
cache: sbt
41+
42+
- name: Setup Java (zulu@21)
43+
if: matrix.java == 'zulu@21'
44+
uses: actions/setup-java@v4
45+
with:
46+
distribution: zulu
47+
java-version: 21
48+
cache: sbt
49+
50+
- run: sbt -J-Xmx2G '++ ${{ matrix.scala }}' test mimaReportBinaryIssues
51+
52+
- name: Compress target directories
53+
run: tar cf targets.tar target project/target
54+
55+
- name: Upload target directories
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
59+
path: targets.tar
60+
61+
publish:
62+
name: Publish Artifacts
63+
needs: [build]
64+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
65+
strategy:
66+
matrix:
67+
os: [ubuntu-latest]
68+
scala: [2.13.15]
69+
runs-on: ${{ matrix.os }}
70+
steps:
71+
- name: Checkout current branch (full)
72+
uses: actions/checkout@v4
73+
with:
74+
fetch-depth: 0
75+
76+
- name: Setup Java (zulu@17)
77+
uses: actions/setup-java@v4
78+
with:
79+
distribution: zulu
80+
java-version: 17
81+
cache: sbt
82+
83+
- name: Download target directories (2.11.12)
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
87+
88+
- name: Inflate target directories (2.11.12)
89+
run: |
90+
tar xf targets.tar
91+
rm targets.tar
92+
93+
- name: Download target directories (2.12.20)
94+
uses: actions/download-artifact@v4
95+
with:
96+
name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }}
97+
98+
- name: Inflate target directories (2.12.20)
99+
run: |
100+
tar xf targets.tar
101+
rm targets.tar
102+
103+
- name: Download target directories (2.13.15)
104+
uses: actions/download-artifact@v4
105+
with:
106+
name: target-${{ matrix.os }}-2.13.15-${{ matrix.java }}
107+
108+
- name: Inflate target directories (2.13.15)
109+
run: |
110+
tar xf targets.tar
111+
rm targets.tar
112+
113+
- name: Download target directories (3.3.4)
114+
uses: actions/download-artifact@v4
115+
with:
116+
name: target-${{ matrix.os }}-3.3.4-${{ matrix.java }}
117+
118+
- name: Inflate target directories (3.3.4)
119+
run: |
120+
tar xf targets.tar
121+
rm targets.tar
122+
123+
- env:
124+
CI_SNAPSHOT_RELEASE: +publishSigned
125+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
126+
SONATYPE_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD3 }}
127+
SONATYPE_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME3 }}
128+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
129+
run: sbt -J-Xmx2G ci-release

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0")
88

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

11-
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0")
11+
//addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0")
1212

1313
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
1414

0 commit comments

Comments
 (0)