Skip to content

Commit 0207a9a

Browse files
committed
faster -quick profile in maven and improvements to Github CI
1 parent ddb9167 commit 0207a9a

2 files changed

Lines changed: 160 additions & 88 deletions

File tree

.github/workflows/pr-verify.yml

Lines changed: 159 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -3,101 +3,162 @@ name: PR verify
33
on: pull_request
44

55
jobs:
6+
7+
formatting:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up JDK
12+
uses: actions/setup-java@v1
13+
with:
14+
java-version: 11
15+
- name: Cache local Maven repository
16+
uses: actions/cache@v4
17+
with:
18+
path: ~/.m2/repository
19+
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
20+
restore-keys: |
21+
${{ runner.os }}-jdk${{ matrix.jdk }}-maven-
22+
- name: Check formatting
23+
run: mvn -B formatter:validate impsort:check xml-format:xml-check
24+
- name: Cancel workflow on failure
25+
uses: vishnudxb/cancel-workflow@v1.2
26+
if: failure()
27+
with:
28+
repo: eclipse/rdf4j
29+
workflow_id: ${{ github.run_id }}
30+
access_token: ${{ github.token }}
31+
32+
compile:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Set up JDK
37+
uses: actions/setup-java@v1
38+
with:
39+
java-version: 11
40+
- name: Cache local Maven repository
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.m2/repository
44+
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
45+
restore-keys: |
46+
${{ runner.os }}-jdk${{ matrix.jdk }}-maven-
47+
- name: Compile (mvn clean install)
48+
run: mvn -B clean install -DskipTests
49+
- name: Cancel workflow on failure
50+
uses: vishnudxb/cancel-workflow@v1.2
51+
if: failure()
52+
with:
53+
repo: eclipse/rdf4j
54+
workflow_id: ${{ github.run_id }}
55+
access_token: ${{ github.token }}
56+
657
build:
758
runs-on: ubuntu-latest
859
strategy:
960
matrix:
10-
jdk: [11, 21]
61+
jdk: [ 11, 21 ]
1162
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up JDK
14-
uses: actions/setup-java@v1
15-
with:
16-
java-version: ${{ matrix.jdk }}
17-
- name: Cache local Maven repository
18-
uses: actions/cache@v4
19-
with:
20-
path: ~/.m2/repository
21-
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
22-
restore-keys: |
23-
${{ runner.os }}-jdk${{ matrix.jdk }}-maven-
24-
- name: Check formatting
25-
run: mvn -B formatter:validate impsort:check xml-format:xml-check
26-
- name: Build
27-
run: mvn -B -U -T 2 clean install -Pquick,-formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
28-
- name: Test
29-
run: mvn -B test -P-formatting -DskipITs -Dmaven.javadoc.skip=true
30-
- name: Publish Test Report
31-
if: failure()
32-
uses: scacap/action-surefire-report@v1
33-
with:
34-
check_name: Test report - build - ${{ matrix.jdk }}
35-
- name: Cancel workflow on failure
36-
uses: vishnudxb/cancel-workflow@v1.2
37-
if: failure()
38-
with:
39-
repo: eclipse/rdf4j
40-
workflow_id: ${{ github.run_id }}
41-
access_token: ${{ github.token }}
63+
- uses: actions/checkout@v2
64+
- name: Set up JDK
65+
uses: actions/setup-java@v1
66+
with:
67+
java-version: ${{ matrix.jdk }}
68+
- name: Cache local Maven repository
69+
uses: actions/cache@v4
70+
with:
71+
path: ~/.m2/repository
72+
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
73+
restore-keys: |
74+
${{ runner.os }}-jdk${{ matrix.jdk }}-maven-
75+
- name: Check formatting
76+
run: mvn -B formatter:validate impsort:check xml-format:xml-check
77+
- name: Build
78+
run: mvn clean && mvn -B -U -T 2C install -Pquick
79+
- name: Test
80+
run: mvn -B test -P-formatting -DskipITs -formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
81+
- name: Publish Test Report
82+
if: failure()
83+
uses: scacap/action-surefire-report@v1
84+
with:
85+
check_name: Test report - build - ${{ matrix.jdk }}
86+
- name: Cancel workflow on failure
87+
uses: vishnudxb/cancel-workflow@v1.2
88+
if: failure()
89+
with:
90+
repo: eclipse/rdf4j
91+
workflow_id: ${{ github.run_id }}
92+
access_token: ${{ github.token }}
93+
4294
integration-tests:
4395
runs-on: ubuntu-latest
4496
steps:
45-
- uses: actions/checkout@v2
46-
- name: Set up JDK
47-
uses: actions/setup-java@v1
48-
with:
49-
java-version: 11
50-
- name: Cache local Maven repository
51-
uses: actions/cache@v4
52-
with:
53-
path: ~/.m2/repository
54-
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
55-
restore-keys: |
56-
${{ runner.os }}-jdk11-maven-
57-
- name: Check formatting
58-
run: mvn -B formatter:validate impsort:check xml-format:xml-check
59-
- name: Build
60-
run: mvn -B -U -T 2 clean install -Pquick,-formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
61-
- name: Verify
62-
run: mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true
63-
- name: Publish Test Report
64-
if: failure()
65-
uses: scacap/action-surefire-report@v1
66-
with:
67-
check_name: Test report - integration-tests
68-
- name: Cancel workflow on failure
69-
uses: vishnudxb/cancel-workflow@v1.2
70-
if: failure()
71-
with:
72-
repo: eclipse/rdf4j
73-
workflow_id: ${{ github.run_id }}
74-
access_token: ${{ github.token }}
97+
- uses: actions/checkout@v2
98+
- name: Set up JDK
99+
uses: actions/setup-java@v1
100+
with:
101+
java-version: 11
102+
- name: Cache local Maven repository
103+
uses: actions/cache@v4
104+
with:
105+
path: ~/.m2/repository
106+
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
107+
restore-keys: |
108+
${{ runner.os }}-jdk11-maven-
109+
- name: Check formatting
110+
run: mvn -B formatter:validate impsort:check xml-format:xml-check
111+
- name: Build
112+
run: mvn clean && mvn -B -U -T 2C install -Pquick
113+
- name: Verify
114+
run: mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true
115+
- name: Publish Test Report
116+
if: failure()
117+
uses: scacap/action-surefire-report@v1
118+
with:
119+
check_name: Test report - integration-tests
120+
- name: Cancel workflow on failure
121+
uses: vishnudxb/cancel-workflow@v1.2
122+
if: failure()
123+
with:
124+
repo: eclipse/rdf4j
125+
workflow_id: ${{ github.run_id }}
126+
access_token: ${{ github.token }}
127+
75128
slow-tests:
76129
runs-on: ubuntu-latest
77130
steps:
78-
- uses: actions/checkout@v2
79-
- name: Set up JDK
80-
uses: actions/setup-java@v1
81-
with:
82-
java-version: 11
83-
- name: Cache local Maven repository
84-
uses: actions/cache@v4
85-
with:
86-
path: ~/.m2/repository
87-
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
88-
restore-keys: |
89-
${{ runner.os }}-jdk11-maven-
90-
- name: Check formatting
91-
run: mvn -B formatter:validate impsort:check xml-format:xml-check
92-
- name: Build
93-
run: mvn -B -U -T 2 clean install -Pquick,-formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
94-
- name: Verify
95-
run: mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
96-
- name: Publish Test Report
97-
if: failure()
98-
uses: scacap/action-surefire-report@v1
99-
with:
100-
check_name: Test report - slow-tests
131+
- uses: actions/checkout@v2
132+
- name: Set up JDK
133+
uses: actions/setup-java@v1
134+
with:
135+
java-version: 11
136+
- name: Cache local Maven repository
137+
uses: actions/cache@v4
138+
with:
139+
path: ~/.m2/repository
140+
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
141+
restore-keys: |
142+
${{ runner.os }}-jdk11-maven-
143+
- name: Check formatting
144+
run: mvn -B formatter:validate impsort:check xml-format:xml-check
145+
- name: Build
146+
run: mvn clean && mvn -B -U -T 2C install -Pquick
147+
- name: Verify
148+
run: mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
149+
- name: Publish Test Report
150+
if: failure()
151+
uses: scacap/action-surefire-report@v1
152+
with:
153+
check_name: Test report - slow-tests
154+
- name: Cancel workflow on failure
155+
uses: vishnudxb/cancel-workflow@v1.2
156+
if: failure()
157+
with:
158+
repo: eclipse/rdf4j
159+
workflow_id: ${{ github.run_id }}
160+
access_token: ${{ github.token }}
161+
101162
package-assembly:
102163
runs-on: ubuntu-latest
103164
steps:
@@ -114,7 +175,7 @@ jobs:
114175
restore-keys: |
115176
${{ runner.os }}-jdk11-maven-
116177
- name: Run install
117-
run: mvn -B install -DskipTests
178+
run: mvn clean && mvn -B -U -T 2C install -Pquick
118179
- name: Package assembly
119180
run: mvn package -Passembly -DskipTests
120181
- name: Cancel workflow on failure
@@ -124,6 +185,7 @@ jobs:
124185
repo: eclipse/rdf4j
125186
workflow_id: ${{ github.run_id }}
126187
access_token: ${{ github.token }}
188+
127189
e2e:
128190
runs-on: ubuntu-latest
129191
steps:
@@ -155,9 +217,18 @@ jobs:
155217
repo: eclipse/rdf4j
156218
workflow_id: ${{ github.run_id }}
157219
access_token: ${{ github.token }}
220+
158221
copyright-check:
159222
runs-on: ubuntu-latest
160223
steps:
161-
- uses: actions/checkout@v2
162-
- name: check copyright header present
163-
run: scripts/checkCopyrightPresent.sh
224+
- uses: actions/checkout@v2
225+
- name: check copyright header present
226+
run: scripts/checkCopyrightPresent.sh
227+
- name: Cancel workflow on failure
228+
uses: vishnudxb/cancel-workflow@v1.2
229+
if: failure()
230+
with:
231+
repo: eclipse/rdf4j
232+
workflow_id: ${{ github.run_id }}
233+
access_token: ${{ github.token }}
234+

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
<impsort.skip>true</impsort.skip>
209209
<xml-format.skip>true</xml-format.skip>
210210
<japicmp.skip>true</japicmp.skip>
211+
<enforcer.skip>true</enforcer.skip>
211212
</properties>
212213
</profile>
213214
<profile>

0 commit comments

Comments
 (0)