-
-
Notifications
You must be signed in to change notification settings - Fork 21
355 lines (353 loc) · 13.1 KB
/
Copy pathmain.yml
File metadata and controls
355 lines (353 loc) · 13.1 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
name: Owlplug Main
on:
push:
branches:
- master
- dev
- ci/*
- openjdk/*
- support/*
jobs:
build-host-win:
strategy:
matrix:
platform: [ win-x64 ]
include:
- platform: win-x64
arch: x64
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
env:
OS: windows
- name: Get Host Version
run: echo "version=$((Select-Xml -Path owlplug-host/src/main/juce/OwlPlugHost.jucer -XPath '//JUCERPROJECT/@version').Node.Value)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
id: get-version
- name: "Build Host"
run: ./build/build-host-win.sh
shell: bash
- name: Add architecture to filename
run: mv "owlplug-host/src/main/juce/Builds/VisualStudio2019/x64/Release/Dynamic Library/owlplug-host-${{ env.version }}.dll" "owlplug-host/src/main/juce/Builds/VisualStudio2019/x64/Release/Dynamic Library/owlplug-host-${{ env.version }}-${{ matrix.platform }}.dll"
- name: Upload Host Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-host-${{ matrix.platform }}
path: owlplug-host/src/main/juce/Builds/VisualStudio2019/x64/Release/Dynamic Library/owlplug-host-${{ env.version }}-${{ matrix.platform }}.dll
build-host-osx:
strategy:
matrix:
platform: [ osx-x64, osx-arm64 ]
include:
- platform: osx-x64
arch: x64
os: macos-15-intel
- platform: osx-arm64
arch: arm64
os: macos-15
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
env:
OS: osx
- name: Install XmlStarlet
run: brew install xmlstarlet
- name: Get Host Version
run: echo "version=$(xmlstarlet sel -t -v 'string(//JUCERPROJECT/@version)' owlplug-host/src/main/juce/OwlPlugHost.jucer)" >> $GITHUB_ENV
id: get-version
- name: "Build Host"
run: ./build/build-host-osx.sh
shell: bash
- name: Add architecture to filename
run: mv owlplug-host/src/main/juce/Builds/MacOSX/build/Release/owlplug-host-${{ env.version }}.dylib owlplug-host/src/main/juce/Builds/MacOSX/build/Release/owlplug-host-${{ env.version }}-${{ matrix.platform }}.dylib
- name: Upload Host Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-host-${{ matrix.platform }}
path: owlplug-host/src/main/juce/Builds/MacOSX/build/Release/owlplug-host-${{ env.version }}-${{ matrix.platform }}.dylib
build-host-linux:
strategy:
matrix:
platform: [ linux-x64 ]
include:
- platform: linux-x64
arch: x64
os: ubuntu-24.04
# Projucer is only distributed for x64/amd64 linux.
# The projucer is required to generate the Makefile, but the build can be run for arm64 after that.
# A solution to support arm64 OwlPlug scanner would be to download projucer and render the Makefile
# prior to the build matrix in a prepare job.
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
env:
OS: linux
- name : Install Juce dev dependencies
run: sudo apt update && sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype-dev libfreetype6-dev libfontconfig1-dev
- name: Install XmlStarlet
run: sudo apt-get install xmlstarlet
- name: Get Host Version
run: echo "version=$(xmlstarlet sel -t -v 'string(//JUCERPROJECT/@version)' owlplug-host/src/main/juce/OwlPlugHost.jucer)" >> $GITHUB_ENV
id: get-version
- name: "Build Host"
run: ./build/build-host-linux.sh
shell: bash
- name: Add version and architecture to filename
run: mv owlplug-host/src/main/juce/Builds/LinuxMakefile/build/libowlplug-host.so owlplug-host/src/main/juce/Builds/LinuxMakefile/build/owlplug-host-${{ env.version }}-${{ matrix.platform }}.so
- name: Upload Host Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-host-${{ matrix.platform }}
path: owlplug-host/src/main/juce/Builds/LinuxMakefile/build/owlplug-host-${{ env.version }}-${{ matrix.platform }}.so
build-jar:
strategy:
matrix:
platform: [ win-x64, osx-x64, osx-arm64, linux-x64 ]
include:
- platform: win-x64
arch: x64
os: windows-latest
- platform: osx-x64
arch: x64
os: macos-15-intel
- platform: osx-arm64
arch: arm64
os: macos-15
- platform: linux-x64
arch: x64
os: ubuntu-24.04
runs-on: ${{ matrix.os }}
needs: [ build-host-win, build-host-osx, build-host-linux ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
shell: bash
id: get-version
- name: Install Native Host artifact
uses: actions/download-artifact@v8
with:
name: owlplug-host-${{ matrix.platform }}
path: owlplug-host/src/main/resources
- name: Get OwlPlug Scanner version
run: echo "scanner_version=$(cat ./owlplug-host/src/main/resources/owlplug-scanner.version)" >> $GITHUB_ENV
shell: bash
id: get-scanner-version
- name: Download scanner binary
run: curl --fail --location https://github.com/OwlPlug/owlplug-scanner/releases/download/${{ env.scanner_version }}/owlplug-scanner-${{ env.scanner_version }}-${{ matrix.platform }} --output owlplug-host/src/main/resources/owlplug-scanner-${{ env.scanner_version }}-${{ matrix.platform }}
- name: Build maven parent project
run: mvn -B install -DskipTests
- name: Build runnable Jar
run: cd owlplug-client && mvn -B install spring-boot:repackage -DskipTests
- name: Upload Jar Build Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-client-jar-${{ matrix.platform }}
path: owlplug-client/target/owlplug-client-${{ env.version }}.jar
package-win-msi:
strategy:
matrix:
platform: [ win-x64 ]
include:
- platform: win-x64
arch: x64
os: windows-latest
runs-on: ${{ matrix.os }}
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
shell: bash
id: get-version
- name: Install Jar artifact
uses: actions/download-artifact@v8
with:
name: owlplug-client-jar-${{ matrix.platform }}
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-msi.cmd ${{ env.version }} ${{ matrix.platform }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-installer-msi-${{ matrix.platform }}
path: build/output/OwlPlug-${{ env.version }}-${{ matrix.platform }}.msi
package-osx-dmg:
strategy:
matrix:
platform: [ osx-x64, osx-arm64 ]
include:
- platform: osx-x64
arch: x64
os: macos-15-intel
- platform: osx-arm64
arch: arm64
os: macos-15
runs-on: ${{ matrix.os }}
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
- name: Install Jar artifact
uses: actions/download-artifact@v8
with:
name: owlplug-client-jar-${{ matrix.platform }}
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-dmg.sh ${{ env.version }} ${{ matrix.platform }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-installer-dmg-${{ matrix.platform }}
path: build/output/OwlPlug-${{ env.version }}-${{ matrix.platform }}.dmg
package-linux-deb:
strategy:
matrix:
platform: [ linux-x64 ]
include:
- platform: linux-x64
arch: x64
os: ubuntu-24.04
runs-on: ${{ matrix.os }}
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
- name: Install Jar artifact
uses: actions/download-artifact@v8
with:
name: owlplug-client-jar-${{ matrix.platform }}
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-deb.sh ${{ env.version }} ${{ matrix.platform }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-installer-deb-${{ matrix.platform }}
path: build/output/OwlPlug-${{ env.version }}-${{ matrix.platform }}.deb
package-linux-appimage:
strategy:
matrix:
platform: [ linux-x64 ]
include:
- platform: linux-x64
arch: x64
os: ubuntu-24.04
app_image_arch: x86_64
runs-on: ${{ matrix.os }}
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
- name: Install Jar artifact
uses: actions/download-artifact@v8
with:
name: owlplug-client-jar-${{ matrix.platform }}
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-appimage.sh ${{ env.version }} ${{ matrix.platform }}
- name: Download FUSE dependency
run: sudo add-apt-repository universe && sudo apt install libfuse2
- name: Download AppImage Tool
run: wget "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${{ matrix.app_image_arch }}.AppImage"
- name: Allow AppImage Execution
run: chmod a+x appimagetool-${{ matrix.app_image_arch }}.AppImage
- name: Run AppImage Tool
run: ./appimagetool-${{ matrix.app_image_arch }}.AppImage build/OwlPlug.AppDir --verbose
- name: Rename OwlPlug AppImage
run: mv OwlPlug-${{ matrix.app_image_arch }}.AppImage OwlPlug-${{ env.version }}-${{ matrix.platform }}.AppImage
- name: Upload Installer Artifact
uses: actions/upload-artifact@v7
with:
name: owlplug-appimage-${{ matrix.platform }}
path: OwlPlug-${{ env.version }}-${{ matrix.platform }}.AppImage
release:
needs: [package-win-msi, package-osx-dmg, package-linux-deb, package-linux-appimage]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/support/')
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v6
- name: Retrieve installer artifacts
uses: actions/download-artifact@v8
with:
path: ./packages
pattern: owlplug-installer-*
- name: Retrieve appimage artifacts
uses: actions/download-artifact@v8
with:
path: ./packages
pattern: owlplug-appimage-*
- uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
draft: true
tag_name: latest
name: OwlPlug Latest
files: |
packages/**/*