Skip to content

Commit 87b4cdf

Browse files
committed
Merge branch 'main' into nativecompile
# Conflicts: # build.gradle # src/main/java/org/jabref/logic/protectedterms/ProtectedTermsParser.java
2 parents f8b3771 + 79c1998 commit 87b4cdf

195 files changed

Lines changed: 3053 additions & 1748 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cleanup-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ jobs:
1919
run: |
2020
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
2121
echo "secretspresent=NO" >> $GITHUB_OUTPUT
22+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
2223
else
2324
echo "secretspresent=YES" >> $GITHUB_OUTPUT
25+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
2426
fi
2527
env:
2628
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}

.github/workflows/deployment-arm64.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ jobs:
5454
run: |
5555
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
5656
echo "secretspresent=NO" >> $GITHUB_OUTPUT
57+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
5758
else
5859
echo "secretspresent=YES" >> $GITHUB_OUTPUT
60+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
5961
fi
6062
env:
6163
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
@@ -66,12 +68,12 @@ jobs:
6668
submodules: 'true'
6769
show-progress: 'false'
6870
- name: Install GitVersion
69-
uses: gittools/actions/gitversion/setup@v1.1.1
71+
uses: gittools/actions/gitversion/setup@v3.0.0
7072
with:
7173
versionSpec: "5.x"
7274
- name: Run GitVersion
7375
id: gitversion
74-
uses: gittools/actions/gitversion/execute@v1.1.1
76+
uses: gittools/actions/gitversion/execute@v3.0.0
7577
- name: Setup JDK
7678
uses: actions/setup-java@v4
7779
with:
@@ -109,6 +111,7 @@ jobs:
109111
--module org.jabref/org.jabref.Launcher \
110112
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
111113
--add-modules org.jabref,org.jabref.merged.module \
114+
--add-modules jdk.incubator.vector \
112115
--dest build/distribution \
113116
--app-content buildres/mac/jabrefHost.py \
114117
--app-content buildres/mac/native-messaging-host \
@@ -137,7 +140,8 @@ jobs:
137140
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
138141
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
139142
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
140-
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
143+
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
144+
--java-options --add-modules=jdk.incubator.vector
141145
- name: Build pkg (macOS)
142146
if: (steps.checksecrets.outputs.secretspresent == 'YES')
143147
shell: bash
@@ -146,6 +150,7 @@ jobs:
146150
--module org.jabref/org.jabref.Launcher \
147151
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
148152
--add-modules org.jabref,org.jabref.merged.module \
153+
--add-modules jdk.incubator.vector \
149154
--dest build/distribution \
150155
--app-content buildres/mac/jabrefHost.py \
151156
--app-content buildres/mac/native-messaging-host \
@@ -173,7 +178,8 @@ jobs:
173178
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
174179
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
175180
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
176-
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
181+
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
182+
--java-options --add-modules=jdk.incubator.vector
177183
- name: Rename files with arm64 suffix as well
178184
if: (steps.checksecrets.outputs.secretspresent == 'YES')
179185
shell: bash
@@ -225,8 +231,10 @@ jobs:
225231
run: |
226232
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
227233
echo "secretspresent=NO" >> $GITHUB_OUTPUT
234+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
228235
else
229236
echo "secretspresent=YES" >> $GITHUB_OUTPUT
237+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
230238
fi
231239
env:
232240
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}

.github/workflows/deployment-jdk-ea.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ jobs:
8484
packages: pigz
8585
version: 1.0
8686
- name: Install GitVersion
87-
uses: gittools/actions/gitversion/setup@v1.1.1
87+
uses: gittools/actions/gitversion/setup@v3.0.0
8888
with:
8989
versionSpec: "5.x"
9090
- name: Run GitVersion
9191
id: gitversion
92-
uses: gittools/actions/gitversion/execute@v1.1.1
92+
uses: gittools/actions/gitversion/execute@v3.0.0
9393

9494
# JDK
9595
- name: 'Set up JDK ${{ matrix.jdk }}'

.github/workflows/deployment.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ jobs:
9999
run: |
100100
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
101101
echo "secretspresent=NO" >> $GITHUB_OUTPUT
102+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
102103
else
103104
echo "secretspresent=YES" >> $GITHUB_OUTPUT
105+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
104106
fi
105107
env:
106108
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
@@ -117,12 +119,12 @@ jobs:
117119
packages: pigz
118120
version: 1.0
119121
- name: Install GitVersion
120-
uses: gittools/actions/gitversion/setup@v1.1.1
122+
uses: gittools/actions/gitversion/setup@v3.0.0
121123
with:
122124
versionSpec: "5.x"
123125
- name: Run GitVersion
124126
id: gitversion
125-
uses: gittools/actions/gitversion/execute@v1.1.1
127+
uses: gittools/actions/gitversion/execute@v3.0.0
126128
- name: Setup JDK
127129
uses: actions/setup-java@v4
128130
with:
@@ -159,6 +161,7 @@ jobs:
159161
--module org.jabref/org.jabref.Launcher \
160162
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
161163
--add-modules org.jabref,org.jabref.merged.module \
164+
--add-modules jdk.incubator.vector \
162165
--dest build/distribution \
163166
--app-content buildres/mac/jabrefHost.py \
164167
--app-content buildres/mac/native-messaging-host \
@@ -187,7 +190,8 @@ jobs:
187190
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
188191
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
189192
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
190-
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
193+
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
194+
--java-options --add-modules=jdk.incubator.vector
191195
- name: Build pkg (macOS)
192196
if: (matrix.os == 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
193197
shell: bash
@@ -196,6 +200,7 @@ jobs:
196200
--module org.jabref/org.jabref.Launcher \
197201
--module-path ${{env.JAVA_HOME}}/jmods/:build/jlinkbase/jlinkjars \
198202
--add-modules org.jabref,org.jabref.merged.module \
203+
--add-modules jdk.incubator.vector \
199204
--dest build/distribution \
200205
--app-content buildres/mac/jabrefHost.py \
201206
--app-content buildres/mac/native-messaging-host \
@@ -224,7 +229,8 @@ jobs:
224229
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref \
225230
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref \
226231
--java-options --add-opens=javafx.controls/javafx.scene.control=org.jabref \
227-
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref
232+
--java-options --add-opens=javafx.controls/com.sun.javafx.scene.control=org.jabref \
233+
--java-options --add-modules=jdk.incubator.vector
228234
- name: Build runtime image and installer (linux, Windows)
229235
if: (matrix.os != 'macos-13') && (steps.checksecrets.outputs.secretspresent == 'YES')
230236
shell: bash
@@ -306,8 +312,10 @@ jobs:
306312
run: |
307313
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
308314
echo "secretspresent=NO" >> $GITHUB_OUTPUT
315+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
309316
else
310317
echo "secretspresent=YES" >> $GITHUB_OUTPUT
318+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
311319
fi
312320
env:
313321
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
@@ -331,8 +339,10 @@ jobs:
331339
run: |
332340
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
333341
echo "secretspresent=NO" >> $GITHUB_OUTPUT
342+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
334343
else
335344
echo "secretspresent=YES" >> $GITHUB_OUTPUT
345+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
336346
fi
337347
env:
338348
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}

.github/workflows/gource.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ jobs:
7575
run: |
7676
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
7777
echo "secretspresent=NO" >> $GITHUB_OUTPUT
78+
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
7879
else
7980
echo "secretspresent=YES" >> $GITHUB_OUTPUT
81+
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
8082
fi
8183
env:
8284
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}

.github/workflows/tests.yml

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ on:
55
branches:
66
- main
77
- main-release
8-
pull_request:
98
merge_group:
109
workflow_dispatch:
10+
# The checkers should write comments on the PR if something fails. For this, we need to have a proper GITHUB_TOKEN. This is enabled by ..._target.
11+
pull_request_target:
1112

1213
env:
1314
SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }}
@@ -51,6 +52,21 @@ jobs:
5152
gradle-home-cache-cleanup: true
5253
- name: Run checkstyle using gradle
5354
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh
55+
- name: Add comment on pull request
56+
if: ${{ failure() }}
57+
uses: thollander/actions-comment-pull-request@v2
58+
with:
59+
message: >
60+
Your code currently does not meet [JabRef's code guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
61+
We use [Checkstyle](https://checkstyle.sourceforge.io/) to identify issues.
62+
The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR.
63+
Please carefully follow [the setup guide for the codestyle](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
64+
Afterwards, please [run checkstyle locally](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#run-checkstyle) and fix the issues.
65+
66+
67+
You can check review dog's comments at the tab "Files changed" of your pull request.
68+
comment_tag: automated-test-feedback
69+
5470
openrewrite:
5571
name: OpenRewrite
5672
runs-on: ubuntu-latest
@@ -72,6 +88,20 @@ jobs:
7288
- name: Run OpenRewrite
7389
run: |
7490
./gradlew rewriteDryRun
91+
- name: Add comment on pull request
92+
if: ${{ failure() }}
93+
uses: thollander/actions-comment-pull-request@v2
94+
with:
95+
message: >
96+
Your code currently does not meet JabRef's code guidelines.
97+
We use [OpenRewrite](https://docs.openrewrite.org/) to ensure "modern" Java coding practices.
98+
The issues found can be **automatically fixed**.
99+
Please execute the gradle task *`rewriteRun`*, check the results, commit, and push.
100+
101+
102+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
103+
comment_tag: automated-test-feedback
104+
75105
modernizer:
76106
name: Modernizer
77107
runs-on: ubuntu-latest
@@ -95,6 +125,19 @@ jobs:
95125
# enable failing of this task if modernizer complains
96126
sed -i "s/failOnViolations = false/failOnViolations = true/" build.gradle
97127
./gradlew modernizer
128+
- name: Add comment on pull request
129+
if: ${{ failure() }}
130+
uses: thollander/actions-comment-pull-request@v2
131+
with:
132+
message: >
133+
Your code currently does not meet JabRef's code guidelines.
134+
We use [Gradle Modernizer Plugin](https://github.com/andygoossens/gradle-modernizer-plugin#gradle-modernizer-plugin) to ensure "modern" Java coding practices.
135+
Please fix the detected errors, commit, and push.
136+
137+
138+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
139+
comment_tag: automated-test-feedback
140+
98141
markdown:
99142
name: Markdown
100143
runs-on: ubuntu-latest
@@ -110,6 +153,19 @@ jobs:
110153
globs: |
111154
*.md
112155
docs/**/*.md
156+
- name: Add comment on pull request
157+
if: ${{ failure() }}
158+
uses: thollander/actions-comment-pull-request@v2
159+
with:
160+
message: >
161+
You modified Markdown (`*.md`) files and did not meet JabRef's rules for consistently formatted Markdown files.
162+
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
163+
[Markdown lint's rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules) help to keep our Markdown files consistent within this repository and consistent with the Markdown files outside here.
164+
165+
166+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Markdown".
167+
comment_tag: automated-test-feedback
168+
113169
changelog:
114170
name: CHANGELOG.md
115171
runs-on: ubuntu-latest
@@ -136,6 +192,7 @@ jobs:
136192
# exit 1 in case of error
137193
# We have 1 "valid" issue in CHANGELOG.md
138194
grep -q "1 problem" heylogs.txt || exit 1
195+
139196
changelog-unreleased-only:
140197
name: CHANGELOG.md - only unreleased touched
141198
runs-on: ubuntu-latest
@@ -156,6 +213,15 @@ jobs:
156213
diff \
157214
<(git show origin/main:CHANGELOG.md | clparse --format=json --separator=– - | jq '.releases[] | select(.version != null)') \
158215
<(git show HEAD:CHANGELOG.md | clparse --format=json --separator=– - | jq '.releases[] | select(.version != null)')
216+
- name: Add comment on pull request
217+
if: ${{ failure() }}
218+
uses: thollander/actions-comment-pull-request@v2
219+
with:
220+
message: >
221+
While the PR was in progress, JabRef released a new version.
222+
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.
223+
comment_tag: automated-test-feedback
224+
159225
tests:
160226
name: Unit tests
161227
runs-on: ubuntu-latest
@@ -187,6 +253,7 @@ jobs:
187253
- name: Format failed test results
188254
if: failure()
189255
run: scripts/after-failure.sh
256+
190257
databasetests:
191258
name: Database tests
192259
runs-on: ubuntu-latest
@@ -238,6 +305,7 @@ jobs:
238305
env:
239306
CI: "true"
240307
DBMS: "mysql"
308+
241309
guitests:
242310
name: GUI tests
243311
runs-on: ubuntu-latest
@@ -260,6 +328,7 @@ jobs:
260328
run: xvfb-run --auto-servernum ./gradlew guiTest
261329
env:
262330
CI: "true"
331+
263332
codecoverage:
264333
name: Code coverage
265334
runs-on: ubuntu-latest
@@ -282,8 +351,10 @@ jobs:
282351
run: |
283352
if [ "$CODECOV_TOKEN" == "" ]; then
284353
echo "secretspresent=NO" >> $GITHUB_OUTPUT
354+
echo "❌ Secret CODECOV_TOKEN not present"
285355
else
286356
echo "secretspresent=YES" >> $GITHUB_OUTPUT
357+
echo "✔️ Secret CODECOV_TOKEN present"
287358
fi
288359
env:
289360
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -319,6 +390,7 @@ jobs:
319390
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
320391
env:
321392
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
393+
322394
# This is https://github.com/marketplace/actions/gradle-wrapper-validation
323395
# It ensures that the jar file is from gradle and not by a strange third party.
324396
gradlevalidation:
@@ -329,6 +401,7 @@ jobs:
329401
with:
330402
show-progress: 'false'
331403
- uses: gradle/actions/wrapper-validation@v3
404+
332405
# This ensures that no git merge conflict markers (<<<, ...) are contained
333406
merge_conflict_job:
334407
name: Find merge conflicts
@@ -339,6 +412,7 @@ jobs:
339412
show-progress: 'false'
340413
- name: Merge Conflict finder
341414
uses: olivernybroe/action-conflict-finder@v4.0
415+
342416
other_than_main:
343417
name: Source branch is other than "main"
344418
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)