-
Notifications
You must be signed in to change notification settings - Fork 1
297 lines (245 loc) · 11.1 KB
/
vst_host_ci.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
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
---
name: Build Vst Host
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
BUILD_TYPE: Release
jobs:
build_windows_configuration:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Python Dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install -r ${{github.workspace}}/VstHost_Python/requirements.txt
pip install coveralls
- name: Configure CMake
run: |
mkdir build
cd build
cmake "${{github.workspace}}\VstHost_VisualC++" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_GMOCK=1
cd ..
- name: Build C++ Code
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8
- name: Run C++ Unit Tests
run: |
cd ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests.exe
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests.exe
- name: Run Python Unit Tests
run: |
cp ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3 ${{github.workspace}}\VstHost_Python\UnitTests\
cp ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/AudioHostLib.dll ${{github.workspace}}\VstHost_Python\UnitTests\
cd ${{github.workspace}}/VstHost_Python
python -m unittest discover UnitTests "test_*.py"
cd ${{github.workspace}}
- name: Clean Up After Build
run: |
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests.exe
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests.exe
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/VstHost.log
rm -r -fo ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/data
# - name: Archive Build Artifacts
# uses: actions/upload-artifact@v1
# with:
# name: windows_x64
# path: ${{ github.workspace }}/build/bin/${{env.BUILD_TYPE}}
build_linux_configuration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Python Dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install -r ${{github.workspace}}/VstHost_Python/requirements.txt
sudo apt-get install libsndfile1-dev
sudo apt-get install libasound2-dev
- name: Install Doxygen
run: |
sudo apt-get install -y doxygen
- name: Install Gcovr
run: |
sudo apt-get install -y gcovr
- name: Configure CMake
run: |
mkdir build
cd build
cmake "${{github.workspace}}\VstHost_VisualC++" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_GMOCK=1
cd ..
- name: Build C++ Code
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8
- name: Run C++ Unit Tests
run: |
cd ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests
cd ${{github.workspace}}
- name: Generate a code coverage report
uses: threeal/gcovr-action@main
with:
root: ${{github.workspace}}
excludes: |
.*googletest*
.*argparser.hpp*
.*json.hpp*
.*vst3sdk*
.*rtaudio*
fail-under-line: 80
coveralls-send: true
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Run Python Unit Tests
run: |
cp -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3 ${{github.workspace}}/VstHost_Python/UnitTests/adelay.vst3
cp ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/libAudioHostLib.so ${{github.workspace}}/VstHost_Python/UnitTests/
python --version
cd ${{github.workspace}}/VstHost_Python
python -m unittest discover UnitTests "test_*.py"
cd ${{github.workspace}}
- name: Clean Up After Build
run: |
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests
rm -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/VstHost.log
rm -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/data
# - name: Archive Build Artifacts
# uses: actions/upload-artifact@v1
# with:
# name: linux_x64
# path: ${{ github.workspace }}/build/bin/${{env.BUILD_TYPE}}
build_mac_os_configuration:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install -r ${{github.workspace}}/VstHost_Python/requirements.txt
- name: Install Doxygen
run: |
brew install doxygen
- name: Configure CMake
run: |
mkdir build
cd build
cmake -G Xcode ${{github.workspace}}/VstHost_VisualC++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=gcc -DBUILD_GMOCK=1
cd ..
- name: Build C++ Code
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8 --resolve-package-references on
- name: Run C++ Unit Tests
run: |
cd ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests
${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests
- name: Run Python Unit Tests
run: |
cp -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3 ${{github.workspace}}/VstHost_Python/UnitTests/adelay.vst3
cp ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/libAudioHostLib.dylib ${{github.workspace}}/VstHost_Python/UnitTests/
cd ${{github.workspace}}/VstHost_Python
python --version
python -m unittest discover UnitTests "test_*.py"
cd ${{github.workspace}}
- name: Clean Up After Build
run: |
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/ApiUnitTests
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/OfflineToolsUnitTests
rm -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/adelay.vst3
rm ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/VstHost.log
rm -fr ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/data
# - name: Archive Build Artifacts
# uses: actions/upload-artifact@v1
# with:
# name: mac_os
# path: ${{ github.workspace }}/build/bin/${{env.BUILD_TYPE}}
build_android_configuration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: nttld/setup-ndk@v1
id: install-ndk
with:
ndk-version: r24
add-to-path: false
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.19.x'
- name: Install Audio Drivers
run: |
sudo apt-get install libasound2-dev
- name: Use cmake
run: cmake --version
- name: Configure CMake and Build C++ .so for armeabi-v7a
run: |
export ANDROID_NDK_PATH=${{ steps.install-ndk.outputs.ndk-path }}
cmake "${{github.workspace}}\VstHost_VisualC++" -B build_armeabi-v7a -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DANDROID_PLATFORM=android-28 -D ANDROID_ABI=armeabi-v7a -DANDROID_BUILD=True
cd build_armeabi-v7a
${{ steps.install-ndk.outputs.ndk-path }}/prebuilt/linux-x86_64/bin/make
cd ..
- name: Configure CMake and Build C++ .so for arm64-v8a
run: |
export ANDROID_NDK_PATH=${{ steps.install-ndk.outputs.ndk-path }}
cmake "${{github.workspace}}\VstHost_VisualC++" -B build_arm64-v8a -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DANDROID_PLATFORM=android-28 -D ANDROID_ABI=arm64-v8a -DANDROID_BUILD=True
cd build_arm64-v8a
${{ steps.install-ndk.outputs.ndk-path }}/prebuilt/linux-x86_64/bin/make
cd ..
- name: Configure CMake and Build C++ .so for x86
run: |
export ANDROID_NDK_PATH=${{ steps.install-ndk.outputs.ndk-path }}
cmake "${{github.workspace}}\VstHost_VisualC++" -B build_x86 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DANDROID_PLATFORM=android-28 -D ANDROID_ABI=x86 -DANDROID_BUILD=True
cd build_x86
${{ steps.install-ndk.outputs.ndk-path }}/prebuilt/linux-x86_64/bin/make
cd ..
- name: Configure CMake and Build C++ .so for x86_64
run: |
export ANDROID_NDK_PATH=${{ steps.install-ndk.outputs.ndk-path }}
cmake "${{github.workspace}}\VstHost_VisualC++" -B build_x86_64 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DANDROID_PLATFORM=android-28 -D ANDROID_ABI=x86_64 -DANDROID_BUILD=True
cd build_x86_64
${{ steps.install-ndk.outputs.ndk-path }}/prebuilt/linux-x86_64/bin/make
cd ..
ls -la
- name: Prepare Setup for Android Build
run: |
mkdir ${{github.workspace}}/VstHost_Android/AndroidPack
cp -rv build_armeabi-v7a/bin/${{env.BUILD_TYPE}}/AndroidPack/ ${{github.workspace}}/VstHost_Android/
cp -rv build_arm64-v8a/bin/${{env.BUILD_TYPE}}/AndroidPack/ ${{github.workspace}}/VstHost_Android/
cp -rv build_x86/bin/${{env.BUILD_TYPE}}/AndroidPack/ ${{github.workspace}}/VstHost_Android/
cp -rv build_x86_64/bin/${{env.BUILD_TYPE}}/AndroidPack/ ${{github.workspace}}/VstHost_Android/
cp -rv build_x86_64/VST3/${{env.BUILD_TYPE}} ${{github.workspace}}/VstHost_Android/app/src/main/assets
cp -v VstHost_VisualC++/modules/UnitTests/data/sine_440.wav ${{github.workspace}}/VstHost_Android/app/src/main/assets/
cp -v VstHost_VisualC++/modules/UnitTests/data/sine_440_output_ref.wav ${{github.workspace}}/VstHost_Android/app/src/main/assets/
cd VstHost_Android
chmod +x gradlew
- name: Run Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
arch: x86_64
profile: Nexus 6
cmake: 3.22.1
working-directory: ${{github.workspace}}/VstHost_Android
script: |
ls -la ${{github.workspace}}/VstHost_Android/app/src/main/assets/
./gradlew connectedCheck