forked from hal/console
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (142 loc) · 5.28 KB
/
native.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Build Native Binaries
on:
release:
types: [created]
jobs:
linux:
name: Linux Binary
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup GraalVM environment
id: setup-graalvm
uses: DeLaGuardo/[email protected]
with:
graalvm: 22.3.0
java: java11
- name: Read Version
id: read-version
run: |
VERSION=$( ./mvnw help:evaluate -Dexpression=project.version --non-recursive --quiet -DforceStdout )
echo "::set-output name=version::$VERSION"
- name: Wait for Maven Central
id: wait-for-maven-central
uses: iFaxity/wait-on-action@v1
with:
resource: https://repo1.maven.org/maven2/org/jboss/hal/hal-bom/${{ steps.read-version.outputs.version }}/hal-bom-${{ steps.read-version.outputs.version }}.pom
interval: 60000 # 1 minute
timeout: 3600000 # 1 hour
- name: Install Native Image
id: install-native-image
run: gu install native-image
- name: Build
id: build
run: $MVN package --projects standalone --also-make -P native,prod,theme-hal
- name: Upload
id: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./standalone/target/hal-standalone-${{ steps.read-version.outputs.version }}-runner
asset_name: halconsole-${{ steps.read-version.outputs.version }}-linux
asset_content_type: application/octet-stream
macos:
name: macOS Binary
runs-on: macos-latest
env:
MVN: mvn --show-version --batch-mode
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup GraalVM environment
id: setup-graalvm
uses: DeLaGuardo/[email protected]
with:
graalvm: 22.3.0
java: java11
- name: Read Version
id: read-version
run: |
VERSION=$( ./mvnw help:evaluate -Dexpression=project.version --non-recursive --quiet -DforceStdout )
echo "::set-output name=version::$VERSION"
- name: Wait for Maven Central
id: wait-for-maven-central
uses: iFaxity/wait-on-action@v1
with:
resource: https://repo1.maven.org/maven2/org/jboss/hal/hal-bom/${{ steps.read-version.outputs.version }}/hal-bom-${{ steps.read-version.outputs.version }}.pom
interval: 60000 # 1 minute
timeout: 3600000 # 1 hour
- name: Install Native Image
id: install-native-image
run: gu install native-image
- name: Build
id: build
run: $MVN package --projects standalone --also-make -P native,prod,theme-hal
- name: Upload
id: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./standalone/target/hal-standalone-${{ steps.read-version.outputs.version }}-runner
asset_name: halconsole-${{ steps.read-version.outputs.version }}-macos
asset_content_type: application/octet-stream
windows:
runs-on: windows-2019
name: Windows Binary
env:
MVN: .\mvnw.cmd --show-version --batch-mode
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup GraalVM environment
id: setup-graalvm
uses: DeLaGuardo/[email protected]
with:
graalvm: 22.3.0
java: java11
- name: Read Version
id: read-version
run: |
$version = (cmd /c ".\mvnw.cmd help:evaluate -Dexpression=project.version --non-recursive --quiet -DforceStdout") | Out-String
echo "::set-output name=version::${version}"
- name: Wait for Maven Central
id: wait-for-maven-central
uses: iFaxity/wait-on-action@v1
with:
resource: https://repo1.maven.org/maven2/org/jboss/hal/hal-bom/${{ steps.read-version.outputs.version }}/hal-bom-${{ steps.read-version.outputs.version }}.pom
interval: 60000 # 1 minute
timeout: 3600000 # 1 hour
- name: Install Native Image
id: install-native-image
run: gu.cmd install native-image
- name: Configure Pagefile
id: configure-pagefile
uses: al-cheb/[email protected]
- name: Setup MSVC
id: setup-msvc
uses: ilammy/[email protected]
- name: Build
id: build
run: |
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
.\mvnw.cmd package -Pnative
- name: Upload
id: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: .\standalone\target\hal-standalone-${{ steps.read-version.outputs.version }}-runner.exe
asset_name: halconsole-${{ steps.read-version.outputs.version }}-win64.exe
asset_content_type: application/octet-stream