-
-
Notifications
You must be signed in to change notification settings - Fork 11
264 lines (260 loc) · 9.73 KB
/
main.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
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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Owlplug Main
on:
push:
branches:
- master
- dev
- ci/*
- openjdk/*
- linux
jobs:
build-host-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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: Upload Host Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-host-win
path: owlplug-host/src/main/juce/Builds/VisualStudio2019/x64/Release/Dynamic Library/owlplug-host-${{ env.version }}.dll
build-host-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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: Upload Host Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-host-osx
path: owlplug-host/src/main/juce/Builds/MacOSX/build/Release/owlplug-host-${{ env.version }}.dylib
build-host-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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
- 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 in binary name
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 }}.so
- name: Upload Host Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-host-linux
path: owlplug-host/src/main/juce/Builds/LinuxMakefile/build/owlplug-host-${{ env.version }}.so
build-jar:
runs-on: ubuntu-latest
needs: [build-host-win, build-host-osx, build-host-linux]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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 Windows native Host artifact
uses: actions/download-artifact@v4
with:
name: owlplug-host-win
path: owlplug-host/src/main/resources
- name: Install OSX native Host artifact
uses: actions/download-artifact@v4
with:
name: owlplug-host-osx
path: owlplug-host/src/main/resources
- name: Install Linux native Host artifact
uses: actions/download-artifact@v4
with:
name: owlplug-host-linux
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
id: get-scanner-version
- name: Download scanner win binary
run: curl --location https://github.com/OwlPlug/owlplug-scanner/releases/download/${{ env.scanner_version }}/owlplug-scanner-${{ env.scanner_version }}-win.exe --output owlplug-host/src/main/resources/owlplug-scanner-${{ env.scanner_version }}-win.exe
- name: Download scanner osx binary
run: curl --location https://github.com/OwlPlug/owlplug-scanner/releases/download/${{ env.scanner_version }}/owlplug-scanner-${{ env.scanner_version }}-osx --output owlplug-host/src/main/resources/owlplug-scanner-${{ env.scanner_version }}-osx
- name: Download scanner linux binary
run: curl --location https://github.com/OwlPlug/owlplug-scanner/releases/download/${{ env.scanner_version }}/owlplug-scanner-${{ env.scanner_version }}-linux --output owlplug-host/src/main/resources/owlplug-scanner-${{ env.scanner_version }}-linux
- 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@v4
with:
name: owlplug-client-jar
path: owlplug-client/target/owlplug-client-${{ env.version }}.jar
package-win:
runs-on: windows-latest
needs: [build-jar]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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@v4
with:
name: owlplug-client-jar
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-msi.cmd ${{ env.version }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-installer-win
path: build/output/OwlPlug-${{ env.version }}.msi
package-osx:
runs-on: macos-latest
needs: [build-jar]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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@v4
with:
name: owlplug-client-jar
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-dmg.sh ${{ env.version }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-installer-osx
path: build/output/OwlPlug-${{ env.version }}.dmg
package-linux-deb:
runs-on: ubuntu-latest
needs: [build-jar]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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@v4
with:
name: owlplug-client-jar
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-deb.sh ${{ env.version }}
- name: Upload Installer Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-installer-linux
path: build/output/OwlPlug-${{ env.version }}.deb
package-linux-appimage:
runs-on: ubuntu-latest
needs: [build-jar]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- 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@v4
with:
name: owlplug-client-jar
path: owlplug-client/target
- name: Package installer
run: cd build && ./package-appimage.sh ${{ env.version }}
- name: Download AppImage Tool
run: curl -o appimagetool.appimage https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
- name: Allow AppImage Execution
run: chmod u+x appimagetool.appimage
- name: Run AppImage Tool
run: appimagetool.appimage
- name: Upload Installer Artifact
uses: actions/upload-artifact@v4
with:
name: owlplug-installer-linux
path: build/output/OwlPlug-${{ env.version }}.appimage