Skip to content
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

chore: adding profiles for native compile testings #1931

Merged
merged 5 commits into from
Jun 12, 2023
Merged

Conversation

zhumin8
Copy link
Contributor

@zhumin8 zhumin8 commented Jun 7, 2023

Based off mpeddada1#1, adding spring-native for parent pom, and native-sample for samples pom.
These added profile should not have any affect on existing workflows.
To be followed by #1933 .

Install and use GraalVM compiler and install native image extension with gu install native-image.
To package and run sample as native, instead of mvn spring-boot:run:
mvn clean package -Pnative-sample -DskipTests then execute the target built.
To run integration tests of sample as native, add relevant system property to systemPropertyVariables :
mvn -Pnative-sample clean test

@zhumin8 zhumin8 requested review from burkedavison and mpeddada1 June 7, 2023 21:12
@zhumin8 zhumin8 marked this pull request as ready for review June 8, 2023 12:46
@zhumin8 zhumin8 requested a review from a team as a code owner June 8, 2023 12:46
@zhumin8
Copy link
Contributor Author

zhumin8 commented Jun 8, 2023

Restructured native profiles for sample pom to make use of spring boot native/nativeTest profiles.
Added two profiles:

  • native-sample-config: containing additional config for native-maven-plugin the we need. This is needed for both compile and test.
  • nativeTest: adds maven-surefire-plugin configs needed to run our tests. This profile should combine with parent profile with default "merge" (ref)

To build sample executable: mvn clean package -Pnative-sample-config -Pnative -DskipTests
To run sample tests: mvn -PnativeTest clean test -Pnative-sample-config

@mpeddada1 PTAL

Copy link
Contributor

@mpeddada1 mpeddada1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

pom.xml Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@zhumin8 zhumin8 merged commit 9aaefd0 into main Jun 12, 2023
@zhumin8 zhumin8 deleted the graalvm-profiles branch June 12, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants