-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Test against GraalVM native image technology #1338
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4b52a0e
Test against GraalVM native image
stIncMale 3c92447
Correctly propagate relevant Java system properties when running `gra…
stIncMale 280b2d9
Remove MongoDB 7.0 from the `graalvm-native-image-app` Evergreen matrix
stIncMale d598109
Disable `metadataRepository`
stIncMale bbccbd9
Set `MONGODB_URI` in the `run graalvm native image app` Evergreen fun…
stIncMale 2ec2a67
Improve `graalvm-native-image-app/readme.md`
stIncMale 9633e9c
Minor improvements
stIncMale e7a97d9
Use `~` in `readme.md`
stIncMale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Supported/used environment variables: | ||
# MONGODB_URI The connection string to use, including credentials and topology info. | ||
# JAVA_VERSION The Java SE version for Gradle toolchain. | ||
|
||
set -o errexit | ||
|
||
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")" | ||
source "${RELATIVE_DIR_PATH}/javaConfig.bash" | ||
|
||
echo "MONGODB_URI: ${MONGODB_URI}" | ||
echo "JAVA_HOME: ${JAVA_HOME}" | ||
readonly JDK_GRAALVM_VAR_NAME="JDK${JAVA_VERSION}_GRAALVM" | ||
readonly JDK_GRAALVM="${!JDK_GRAALVM_VAR_NAME}" | ||
echo "The JDK distribution for running Gradle is" | ||
echo "$("${JAVA_HOME}"/bin/java --version)" | ||
echo "The Java SE version for the Gradle toolchain is ${JAVA_VERSION}" | ||
echo "The GraalVM JDK distribution expected to be found at \`${JDK_GRAALVM}\` by the Gradle toolchain functionality is" | ||
echo "$("${JDK_GRAALVM}"/bin/java --version)" | ||
echo "The Gradle version is" | ||
./gradlew --version | ||
|
||
echo "Building and running the GraalVM native image app" | ||
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} :graalvm-native-image-app:nativeRun | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note how we only build and run the application, but do not collect reachability metadata - we use that from
graalvm-native-image-app/src/main/resources/META-INF/native-image
, which I collected on my computer (seegraalvm-native-image-app/readme.md
), and also manually added entries for shared libraries for OSes/ISAs different from mine. This means there is a chance we will be able to shovel this metadata in the right JARs and then build and run using only what we have in the JARs. I created JAVA-5381.