Skip to content

Commit 26fa207

Browse files
authored
faster -quick profile in maven and improvements to Github CI (#5355)
* faster -quick profile in maven and improvements to Github CI
1 parent 433cddc commit 26fa207

7 files changed

Lines changed: 141 additions & 148 deletions

File tree

.github/workflows/dash-license.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Set up JDK
15-
uses: actions/setup-java@v1
15+
uses: actions/setup-java@v4
1616
with:
17-
java-version: '21'
18-
- name: Cache local Maven repository
19-
uses: actions/cache@v3
20-
with:
21-
path: ~/.m2/repository
22-
key: ${{ runner.os }}-jdk21-maven-${{ hashFiles('**/pom.xml') }}
23-
restore-keys: |
24-
${{ runner.os }}-jdk20-maven-
17+
java-version: 21
18+
distribution: 'temurin'
19+
cache: maven
20+
- name: Clean install
21+
run: mvn -B clean install -Pquick -DskipTests
22+
- name: Package
23+
run: mvn -B -U package -Pquick -DskipTests
2524
- name: Run license-check
2625
run: mvn -B -Plicence-check org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES
2726
- name: Print Dash Summary

.github/workflows/develop-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
jdk: [11, 17]
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Set up JDK
1919
uses: actions/setup-java@v1
2020
with:

.github/workflows/main-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
jdk: [11, 17]
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Set up JDK
1919
uses: actions/setup-java@v1
2020
with:

.github/workflows/merge_main_to_develop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: pull-request
1515
uses: repo-sync/pull-request@v2.6.2
1616
with:
1717
destination_branch: "develop" # If blank, default: main
1818
pr_title: "Merge main into develop"
1919
pr_body: "Automatically generated PR to keep develop in sync with main.\n\n **USE MERGE COMMIT TO MERGE THIS PR**.\n\nSee [merge_main_to_develop.yml](/eclipse/rdf4j/.github/workflows/merge_main_to_develop.yml)." # Full markdown support, requires pr_title to be set
20-
github_token: ${{ github.token }}
20+
github_token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/pr-verify.yml

Lines changed: 116 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -2,143 +2,144 @@ name: PR verify
22

33
on: pull_request
44

5+
permissions:
6+
contents: read # checkout & other read‑only operations
7+
actions: write # allows the cancel‑workflow step to call the Actions API
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
513
jobs:
14+
15+
formatting-and-quick-compile:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: 11
23+
distribution: 'temurin'
24+
cache: maven
25+
- name: Check formatting
26+
run: mvn -B --quiet -T 2C formatter:validate impsort:check xml-format:xml-check
27+
- name: Quick compile
28+
run: mvn -B --quiet -T 2C compile -DskipTests -Pquick
29+
- name: Download all other dependencies
30+
run: mvn -B --quiet -T 2C dependency:go-offline
31+
32+
compile:
33+
needs: formatting-and-quick-compile
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Set up JDK
38+
uses: actions/setup-java@v4
39+
with:
40+
java-version: 11
41+
distribution: 'temurin'
42+
cache: maven
43+
- name: Compile (mvn clean install)
44+
run: mvn -B clean install -DskipTests
45+
46+
647
build:
48+
needs: formatting-and-quick-compile
749
runs-on: ubuntu-latest
850
strategy:
51+
fail-fast: true
952
matrix:
10-
jdk: [11, 21]
53+
jdk: [ 11, 24 ]
1154
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 }}
55+
- uses: actions/checkout@v4
56+
- name: Set up JDK
57+
uses: actions/setup-java@v4
58+
with:
59+
java-version: ${{ matrix.jdk }}
60+
distribution: 'temurin'
61+
cache: maven
62+
- name: Build
63+
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
64+
- name: Test
65+
run: mvn -B test -DskipITs -P-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
66+
- name: Publish Test Report
67+
if: failure()
68+
uses: scacap/action-surefire-report@v1.9.0
69+
with:
70+
check_name: Test report - build - ${{ matrix.jdk }}
71+
72+
4273
integration-tests:
74+
needs: formatting-and-quick-compile
4375
runs-on: ubuntu-latest
4476
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 }}
77+
- uses: actions/checkout@v4
78+
- name: Set up JDK
79+
uses: actions/setup-java@v4
80+
with:
81+
java-version: 11
82+
distribution: 'temurin'
83+
cache: maven
84+
- name: Build
85+
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
86+
- name: Verify
87+
run: mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip -Denforcer.skip -Danimal.sniffer.skip
88+
- name: Publish Test Report
89+
if: failure()
90+
uses: scacap/action-surefire-report@v1.9.0
91+
with:
92+
check_name: Test report - integration-tests
93+
7594
slow-tests:
95+
needs: formatting-and-quick-compile
7696
runs-on: ubuntu-latest
7797
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
98+
- uses: actions/checkout@v4
99+
- name: Set up JDK
100+
uses: actions/setup-java@v4
101+
with:
102+
java-version: 11
103+
distribution: 'temurin'
104+
cache: maven
105+
- name: Build
106+
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
107+
- name: Verify
108+
run: mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
109+
- name: Publish Test Report
110+
if: failure()
111+
uses: scacap/action-surefire-report@v1.9.0
112+
with:
113+
check_name: Test report - slow-tests
114+
101115
package-assembly:
116+
needs: formatting-and-quick-compile
102117
runs-on: ubuntu-latest
103118
steps:
104-
- uses: actions/checkout@v2
119+
- uses: actions/checkout@v4
105120
- name: Set up JDK
106-
uses: actions/setup-java@v1
121+
uses: actions/setup-java@v4
107122
with:
108123
java-version: 11
109-
- name: Cache local Maven repository
110-
uses: actions/cache@v4
111-
with:
112-
path: ~/.m2/repository
113-
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
114-
restore-keys: |
115-
${{ runner.os }}-jdk11-maven-
124+
distribution: 'temurin'
125+
cache: maven
116126
- name: Run install
117-
run: mvn -B install -DskipTests
127+
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
118128
- name: Package assembly
119129
run: mvn package -Passembly -DskipTests
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 }}
130+
131+
127132
e2e:
133+
needs: formatting-and-quick-compile
128134
runs-on: ubuntu-latest
129135
steps:
130-
- uses: actions/checkout@v2
136+
- uses: actions/checkout@v4
131137
- name: Set up JDK
132-
uses: actions/setup-java@v1
138+
uses: actions/setup-java@v4
133139
with:
134140
java-version: 11
135-
- name: Cache local Maven repository
136-
uses: actions/cache@v4
137-
with:
138-
path: ~/.m2/repository
139-
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
140-
restore-keys: |
141-
${{ runner.os }}-jdk11-maven-
141+
distribution: 'temurin'
142+
cache: maven
142143
- name: Install dependencies
143144
run: sudo apt-get update && sudo apt-get install -y libxml2-utils
144145
- name: Install Node.js
@@ -148,16 +149,11 @@ jobs:
148149
- name: Run end-to-end tests of RDF4J Server and Workbench
149150
working-directory: ./e2e
150151
run: ./run.sh
151-
- name: Cancel workflow on failure
152-
uses: vishnudxb/cancel-workflow@v1.2
153-
if: failure()
154-
with:
155-
repo: eclipse/rdf4j
156-
workflow_id: ${{ github.run_id }}
157-
access_token: ${{ github.token }}
152+
158153
copyright-check:
159154
runs-on: ubuntu-latest
160155
steps:
161-
- uses: actions/checkout@v2
162-
- name: check copyright header present
163-
run: scripts/checkCopyrightPresent.sh
156+
- uses: actions/checkout@v4
157+
- name: check copyright header present
158+
run: scripts/checkCopyrightPresent.sh
159+

core/sail/api/src/test/java/org/eclipse/rdf4j/common/concurrent/locks/ExclusiveReentrantLockManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void cleanupUnreleasedLocksWithTracking() throws InterruptedException {
8282

8383
assertThat(memoryAppender.countEventsForLogger(ExclusiveReentrantLockManager.class.getName())).isEqualTo(2);
8484
memoryAppender.assertContains(
85-
"at org.eclipse.rdf4j.common.concurrent.locks.ExclusiveReentrantLockManagerTest.lambda$lock$2",
85+
"at org.eclipse.rdf4j.common.concurrent.locks.ExclusiveReentrantLockManagerTest.lambda$lock$",
8686
Level.WARN);
8787

8888
}

0 commit comments

Comments
 (0)