devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 101 forks source link

Create build logic for native image of ide #1192

Closed hohwille closed 1 year ago

hohwille commented 1 year ago

When #1191 is implemented, the next step is to create the build logic to build the native image:

alfeilex commented 1 year ago

This action could help to create native-images for different OS's https://github.com/marketplace/actions/github-action-for-graalvm

hohwille commented 1 year ago

Just found the same thing in discussion with Jan and wanted to add here, but @alfeilex was faster. Great šŸ‘ So it seems really easy: https://github.com/marketplace/actions/github-action-for-graalvm#building-a-helloworld-with-graalvm-native-image-on-different-platforms

alfeilex commented 1 year ago

I tried to run the workflow for each OS but there are errors for macOS and windows. Ubuntu works.

macOS: Error: DARWIN does not support building static executable images.

Windows: workflow: https://github.com/alfeilex/ide/actions/runs/5784762695/job/15676095232

alfeilex commented 1 year ago

Windows also works... it was only because the job for macOS failed and all processing jobs are canceled... I did not know about this behaviour

So we have to fix macOS with this --static problem

alfeilex commented 1 year ago

It seems that removing --static solves the build issue

https://github.com/devonfw/ide/blob/013ced0bbf48fce1fa2a580289ad6edda9e74de2/ide/pom.xml#L160-L162

Do we need --static at all?

alfeilex commented 1 year ago

It seems that removing --static solves the build issue

https://github.com/devonfw/ide/blob/013ced0bbf48fce1fa2a580289ad6edda9e74de2/ide/pom.xml#L160-L162

Do we need --static at all?

It seems that --static is used to import statically all dependencies for the application.

hohwille commented 1 year ago

We have identified a new problem in this story:

We discussed several solutions for this problem. The most simple solution is as following:

alfeilex commented 1 year ago

Is transferred to https://github.com/devonfw/IDEasy/issues/4