-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add arm 64 linux runner #13258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add arm 64 linux runner #13258
Conversation
Still some issues with the module exporting: The correct architecture should be picked because the architecture check print gives the right infomration
|
@jjohannes Sorry to bother you again, but do you have any idea why the arm build is failing. Am I missing something? I just added a new target for arm in the conventions gradle. Locally on my computer I see that the task is registered. ![]() |
@Siedlerchr your change is correct. It should not lead to The error indicates that it uses the original Jar and not the transformed one (of One idea: There are sometimes timing problems with the transformation mechanisms if other plugins access things too eagerly. Maybe something like this is happening. Maybe it does not work 100% well together with For now, maybe it helps just rerunning the build. The only thing that is different in the target is that it is completely new and the Jars have never been downloaded/cached before. Although I don't understand why the other things work well in the GH context where things may always be rebuilt... A temporary remedy could also be to first run a |
os.isWindows -> "windows-2022" | ||
else -> error("Unsupported OS") | ||
} | ||
|
||
// Source: https://github.com/jjohannes/java-module-system/blob/main/gradle/plugins/src/main/kotlin/targets.gradle.kts | ||
// Configure variants for OS | ||
// Configure variants for OS. target name can be any just must |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The added sentence seems to be incomplete?
build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
….gradle.kts Co-authored-by: Oliver Kopp <[email protected]>
But we patch it in Thus, it seems an issue with https://github.com/gradlex-org/extra-java-module-info, isn't it @jjohannes ? |
Additionally: - Fix LTWA generation csv file re-download
jablib/src/main/java/org/jabref/generators/JournalListMvGenerator.java
Outdated
Show resolved
Hide resolved
@@ -28,7 +28,7 @@ | |||
@AllowedToUseClassGetResource("Required for loading internal CSL styles") | |||
public class CitationStyleCatalogGenerator { | |||
private static final String STYLES_ROOT = "/csl-styles"; | |||
private static final String CATALOG_PATH = "build/resources/main/citation-style-catalog.json"; | |||
private static final String CATALOG_PATH = "build/generated/resources/citation-style-catalog.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is correct? This will break at runtime I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because this is part of the source sets - see the whole diff for build.gradle.kts
This reverts commit 268aee1.
Cross compilation did not work because it used an x64 java. When I specify the architecture to aarch64 then it does not work either with gradle. thus I close this for th emoment as it's blocked by the java module issues |
@trag-bot didn't find any issues in the code! ✅✨ |
That means, also on your macOS machine following gradle task did not produce a valid arm64 image? Background: I am trying to understand if we maybe can cross-compile from a non-linux.
|
@koppor I downloaded the linux arm image build from the buids.jabref.org and tested it on an ubuntu arm vm |
Could you mabe a) bulid the image on your machine and b) try it in the arm vm? 😅 |
TL;DR you need the target runtime for the system. Jpackage cannot cross compile |
Maybe, it boils down to Adoptium not shipping all jmods: adoptium/adoptium-support#1271 (comment) |
But we use zulu |
I bet that Zulu ships JMODs only for the JDK of the current platform - and not all. Intermediate result:
Still
|
@jjohannes I am totally confused now. The exception comes from Java Module Packaging Gradle plugin: throw new RuntimeException("Running on " + hostOs + "; cannot build for " + os); |
The build of this PR is available at https://builds.jabref.org/pull/13258/merge. |
@@ -157,13 +157,16 @@ jobs: | |||
- os: macos-14 | |||
displayName: macOS (ARM64) | |||
suffix: '_arm64' | |||
runs-on: ${{ matrix.os }} | |||
runs-on: ${{ matrix.os == 'ubuntu-22.04-arm' && 'ubuntu-22.04' || matrix.os }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the wrong approach, it loads the wrong jdk
If we stay on cross compiling:
- JDK does has to match runner OS (currently happening)
- JMODs of target OS have to be downloaded
- jpackage (jlink?) has to be taught to use the downloaded JMODs instead of the ones shipped with the JDK.
Reason: .class files are portable, JMODs are platform-specific. Exceptional behavior for javafx jars is handled by some gradlex plugin.
Fixes #10842
https://github.com/actions/partner-runner-images/blob/main/images/arm-ubuntu-22-image.md
In about one to three sentences, describe the changes you have made: what, where, why, ...
Steps to test
Describe how reviewers can test this fix/feature. Ideally, think of how you would guide a beginner user of Jabef to try out your change.
You can add screenshots or videos (using Loom or by just adding .mp4 files).
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)