-
Notifications
You must be signed in to change notification settings - Fork 79
117 lines (117 loc) · 4.15 KB
/
native-image.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: native-image
on:
workflow_call:
inputs:
publishPreRelease:
description: 'Publish a pre-release ?'
required: true
type: string
default: 'true'
jobs:
setup-xml-version:
runs-on: ubuntu-latest
outputs:
xml-server-version: ${{ steps.setup-xml-version.outputs.XML_SERVER_VERSION }}
steps:
- name: Check Out VS Code XML
uses: actions/checkout@v4
- id: setup-xml-version
run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_OUTPUT
build-binary-unix:
runs-on: ${{ matrix.os }}
needs: setup-xml-version
env:
GRAALVM_DISTRO: graalvm
GRAALVM_JAVA: 17
strategy:
fail-fast: true
matrix:
label: [osx-x86_64, osx-aarch_64, linux, alpine]
include:
- label: osx-x86_64
os: macos-13
- label: osx-aarch_64
os: macos-latest
- label: linux
os: ubuntu-20.04
prop: -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC
- label: alpine
os: ubuntu-20.04
prop: -Dgraalvm.static=--static
steps:
- uses: actions/checkout@v4
with:
repository: 'eclipse/lemminx'
ref: ${{ inputs.publishPreRelease == 'true' && 'main' || needs.setup-xml-version.outputs.xml-server-version }}
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.m2/wrapper
!~/.m2/repository/org/eclipse/lemminx
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache GraalVM
uses: actions/cache@v4
with:
path: |
/opt/hostedtoolcache/graalvm-jdk-*
~/hostedtoolcache/graalvm-jdk-*
key: ${{ runner.os }}-graalvm-jdk-${{ env.GRAALVM_JAVA }}
restore-keys: |
${{ runner.os }}-graalvm-jdk-
- uses: graalvm/setup-graalvm@a1b47fdf04e772fed6b3b46131e226f9aea5e169 #v1.1.6
with:
distribution: ${{env.GRAALVM_DISTRO}}
java-version: ${{env.GRAALVM_JAVA}}
- run: ./mvnw -B package -Dnative -DskipTests ${{ matrix.prop }} -Dcbi.jarsigner.skip=true
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-${{ matrix.label }}
- uses: actions/upload-artifact@v4
with:
name: lemminx-${{ matrix.label }}
path: lemminx-${{ matrix.label }}
if-no-files-found: error
build-binary-windows:
runs-on: windows-latest
needs: setup-xml-version
env:
GRAALVM_DISTRO: graalvm
GRAALVM_JAVA: 17
steps:
- name: Check out LemMinX
uses: actions/checkout@v4
with:
repository: 'eclipse/lemminx'
ref: ${{ inputs.publishPreRelease == 'true' && 'main' || needs.setup-xml-version.outputs.xml-server-version }}
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.m2/wrapper
!~/.m2/repository/org/eclipse/lemminx
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache GraalVM
uses: actions/cache@v4
with:
path: |
C:\hostedtoolcache\windows\graalvm-ce-*
key: ${{ runner.os }}-graalvm-*
restore-keys: |
${{ runner.os }}-graalvm-
- uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d #v1.12.0
- uses: graalvm/setup-graalvm@a1b47fdf04e772fed6b3b46131e226f9aea5e169 #v1.1.6
with:
distribution: ${{env.GRAALVM_DISTRO}}
java-version: ${{env.GRAALVM_JAVA}}
- run: .\mvnw.cmd -B package -Dnative -DskipTests -D "cbi.jarsigner.skip=true"
- run: mv org.eclipse.lemminx\target\lemminx-*.exe lemminx-win32.exe
- uses: actions/upload-artifact@v4
with:
name: lemminx-win32
path: lemminx-win32.exe
if-no-files-found: error