forked from eclipse-lemminx/lemminx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GraalVM's `native-image` feature to generate a executable. To test, install GraalVM and the native-image tool, then set JAVA_HOME to the GraalVM installation. Run `./mvnw package -Dnative -DskipTests` in order to generate an executable under `org.eclipse.lemminx/target`. Includes a GitHub Action in order to run builds of the binary on PRs for testing purposes. Adopted from [PR 673](eclipse-lemminx#673) A part of eclipse-lemminx#314. Signed-off-by: David Thompson <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,849 additions
and
8 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.jenkins] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.java] | ||
indent_style = tab | ||
indent_size = 4 |
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,42 @@ | ||
name: native-image | ||
on: [push, pull_request] | ||
jobs: | ||
build-binary-unix: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
include: | ||
- os: macos-latest | ||
label: 'darwin' | ||
- os: ubuntu-latest | ||
label: 'linux' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: DeLaGuardo/setup-graalvm@8bbfe44ef9c6f5c07e5af036a1bffd561c037d18 | ||
with: | ||
graalvm-version: '20.2.0.java8' | ||
- run: ./mvnw package -Dnative -DskipTests -Dcbi.jarsigner.skip=true | ||
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-$(git rev-parse --short "$GITHUB_SHA")-${{ matrix.label }} | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: lemminx-${{ matrix.label }} | ||
path: lemminx-*-${{ matrix.label }} | ||
if-no-files-found: error | ||
build-binary-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ilammy/[email protected] | ||
- uses: DeLaGuardo/setup-graalvm@8bbfe44ef9c6f5c07e5af036a1bffd561c037d18 | ||
with: | ||
graalvm-version: '20.2.0.java11' | ||
- run: Invoke-Expression -Command "$Env:JAVA_HOME/bin/gu install native-image" | ||
- run: .\mvnw.cmd package -Dnative -DskipTests -D cbi.jarsigner.skip=true | ||
- run: mv org.eclipse.lemminx\target\lemminx-*.exe lemminx-$(git rev-parse --short "$Env:GITHUB_SHA")-win32.exe | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: lemminx-win32 | ||
path: lemminx-*-win32.exe | ||
if-no-files-found: error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name":"org.eclipse.lemminx.services.extensions.IXMLExtension", | ||
"allDeclaredMethods":true | ||
}, |
2 changes: 2 additions & 0 deletions
2
org.eclipse.lemminx/src/main/resources/META-INF/native-image/jni-config.json
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,2 @@ | ||
[ | ||
] |
3 changes: 3 additions & 0 deletions
3
org.eclipse.lemminx/src/main/resources/META-INF/native-image/proxy-config.json
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,3 @@ | ||
[ | ||
["org.eclipse.lemminx.customservice.XMLLanguageClientAPI","org.eclipse.lsp4j.jsonrpc.Endpoint"] | ||
] |
Oops, something went wrong.