forked from redhat-developer/vscode-xml
-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (127 loc) · 4.58 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
118
119
120
121
122
123
124
125
126
127
name: native-image
on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
build-binary-unix:
runs-on: ${{ matrix.os }}
env:
GRAALVM_VERSION: 22.0.0.2
GRAALVM_JAVA: java17
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest]
include:
- os: macos-latest
label: 'osx-x86_64'
- os: ubuntu-latest
label: 'linux'
steps:
- uses: actions/checkout@v2
with:
repository: 'eclipse/lemminx'
- name: Cache Maven dependencies
uses: actions/cache@v2
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@v2
with:
path: |
/opt/hostedtoolcache/GraalVM
~/hostedtoolcache/GraalVM
key: ${{ runner.os }}-graalvm-${{env.GRAALVM_VERSION}}
restore-keys: |
${{ runner.os }}-graalvm-
- uses: DeLaGuardo/setup-graalvm@48f2bf339ab7d35e31029b1822a213681fdfc42e #v5.0
with:
graalvm: ${{env.GRAALVM_VERSION}}
java: ${{env.GRAALVM_JAVA}}
- run: ./mvnw -B package -Dnative -DskipTests $([ $(uname -s) = Linux ] && echo "-Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC") -Dcbi.jarsigner.skip=true
- run: rm org.eclipse.lemminx/target/*.build_artifacts.txt
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-${{ 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
env:
GRAALVM_VERSION: 22.0.0.2
GRAALVM_JAVA: java17
steps:
- name: Check out LemMinX
uses: actions/checkout@v2
with:
repository: 'eclipse/lemminx'
- name: Cache Maven dependencies
uses: actions/cache@v2
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@v2
with:
path: |
C:\hostedtoolcache\windows\GraalVM
key: ${{ runner.os }}-graalvm-${{env.GRAALVM_VERSION}}
restore-keys: |
${{ runner.os }}-graalvm-
- uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d #v1.12.0
- uses: DeLaGuardo/setup-graalvm@48f2bf339ab7d35e31029b1822a213681fdfc42e #v5.0
with:
graalvm: ${{env.GRAALVM_VERSION}}
java: ${{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@v2
with:
name: lemminx-win32
path: lemminx-win32.exe
if-no-files-found: error
release-binary-artifacts:
needs: [build-binary-unix, build-binary-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: 'eclipse/lemminx'
fetch-depth: 2
- run: git rev-parse HEAD^ > lastCommit
- name: Check New Changes To LS
id: cache-last-commit
uses: actions/cache@v2
with:
path: lastCommit
key: lastCommit-${{ hashFiles('lastCommit') }}
- name: Retrieve Binary Artifacts
if: steps.cache-last-commit.outputs.cache-hit != 'true'
uses: actions/download-artifact@v3
- name: Prepare Binary Artifacts
if: steps.cache-last-commit.outputs.cache-hit != 'true'
run: for f in lemminx-linux lemminx-osx-x86_64 lemminx-win32; do pushd ${f} && chmod u+x ${f}* && zip ../${f}.zip ${f}* && sha256sum ${f}* > ../${f}.sha256 && popd; done
- name: Release Binary Artifacts
if: steps.cache-last-commit.outputs.cache-hit != 'true'
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 #v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
lemminx-*.zip
lemminx-*.sha256