forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
264 lines (220 loc) · 8.26 KB
/
azure-pipelines.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
# Surge synth build script
# https://aka.ms/yaml
trigger:
- main
- xt-alpha
- release-xt/*
pr:
- main
- xt-alpha
jobs:
- job: Build
variables:
defaultTargets: "surge-xt_Packaged surge-fx_Packaged"
strategy:
matrix:
macOS-unit-test:
imageName: 'macos-latest'
isMac: True
isMacUnitTest: True
cmakeArguments: "-GXcode"
cmakeTarget: "surge-testrunner"
cmakeConfig: "Release"
windows-x86-32bit:
imageName: 'windows-2019'
isWindows: True
cmakeArguments: "-A Win32 -DCMAKE_BUILD_TYPE=Debug"
cmakeConfig: "Debug"
cmakeTarget: "surge-xt_Standalone" # just a subset for time
macOS-x86:
imageName: 'macos-latest'
isMac: True
isMacFat: True
cmakeArguments: "-GXcode -DCMAKE_BUILD_TYPE=Debug -D\"CMAKE_OSX_ARCHITECTURES=x86_64\""
cmakeTarget: $(defaultTargets)
cmakeConfig: "Debug"
macOS-arm:
imageName: 'macos-latest'
isMac: True
isMacFat: True
cmakeArguments: "-GXcode -DCMAKE_BUILD_TYPE=Debug -D\"CMAKE_OSX_ARCHITECTURES=arm64\""
cmakeTarget: $(defaultTargets)
cmakeConfig: "Debug"
windows-x64:
imageName: 'windows-2019'
isWindows: True
cmakeArguments: "-A x64 -DCMAKE_BUILD_TYPE=Debug"
cmakeConfig: "Debug"
cmakeTarget: $(defaultTargets)
windows-unittest:
imageName: 'windows-2019'
isWindows: True
isWindowsUnitTest: True
cmakeArguments: "-A x64 -DCMAKE_BUILD_TYPE=Release"
cmakeConfig: "Release"
cmakeTarget: "surge-testrunner"
linux-codequality:
imageName: 'ubuntu-20.04'
isLinux: True
aptGetExtras: ""
cmakeArguments: "-GNinja -DCMAKE_BUILD_TYPE=Debug"
cmakeTarget: "code-quality-pipeline-checks"
cmakeConfig: "Debug"
linux-clang-juce-lv2:
imageName: 'ubuntu-20.04'
isLinux: True
aptGetExtras: "clang"
needsLV2: True
cmakeArguments: "-GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DJUCE_SUPPORTS_LV2=True -DSURGE_JUCE_PATH=$PWD/libs/JUCE-lv2"
cmakeTarget: "surge-xt_LV2"
cmakeConfig: "Debug"
linux-juce-python-targets:
imageName: 'ubuntu-22.04'
isLinux: True
cmakeArguments: "-GNinja -DCMAKE_BUILD_TYPE=Debug -DSURGE_BUILD_PYTHON_BINDINGS=True"
cmakeTarget: "surge-xt_Packaged surge-fx_Packaged surgepy"
cmakeConfig: "Debug"
linux-unittest:
imageName: 'ubuntu-20.04'
isLinux: True
isLinuxUnitTest: True
cmakeArguments: "-DCMAKE_BUILD_TYPE=Release"
cmakeConfig: "Release"
cmakeTarget: "surge-testrunner"
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
# submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github
- bash: |
echo "BUILD REASON = " $BUILD_REASON
echo "cmakeArguments = " $(cmakeArguments)
echo "cmakeTarget = " $(cmakeTarget)
echo "cmakeConfig = " $(cmakeConfig)
echo "aptGetExtras = " $(aptGetExtras)
displayName: all - details on build
- bash: |
# do this here, because we're using a shallow clone and it fails using `submodules: recursive` above
# Pipelines be timin out. Try this thrice. Should be cheap if it works.
. ./scripts/misc/defensive-submodule.sh
. ./scripts/misc/defensive-submodule.sh
. ./scripts/misc/defensive-submodule.sh
displayName: all - submodule init
- bash: |
set -e
echo "aptGetExtras are $(aptGetExtras)"
sudo apt-get update
sudo apt-get install -y \
devscripts \
libxcb-cursor-dev \
libxcb-keysyms1-dev \
libxcb-util-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
ninja-build \
xcb \
$(aptGetExtras)
# These are the JUCE deps
sudo apt-get install -y libgtk-3-dev
sudo apt-get install -y libwebkit2gtk-4.0
sudo apt-get install -y libwebkit2gtk-4.0-dev
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y alsa
sudo apt-get install -y alsa-tools
sudo apt-get install -y libasound2-dev
sudo apt-get install -y libjack-dev
sudo apt-get install -y libfreetype6-dev
sudo apt-get install -y libxinerama-dev
sudo apt-get install -y libxcb-xinerama0
sudo apt-get install -y libxinerama1
sudo apt-get install -y x11proto-xinerama-dev
sudo apt-get install -y libxrandr-dev
sudo apt-get install -y libgl1-mesa-dev
sudo apt-get install -y libxcursor-dev
sudo apt-get install -y libxcursor1
sudo apt-get install -y libxcb-cursor-dev
sudo apt-get install -y libxcb-cursor0
sudo apt-get install -y --fix-missing
condition: variables.isLinux
displayName: linux - run apt-get
- bash: |
set -e
cd libs
sudo apt-get install -y lv2-dev
git clone --depth 1 --branch lv2 https://github.com/lv2-porting-project/JUCE JUCE-lv2
cd JUCE-lv2
git checkout lv2
cd ..
displayName: linux - grab LV2 JUCE
condition: variables.needsLV2
- bash: |
sudo xcode-select -s /Applications/Xcode_13.4.1.app
displayName: Select XCode 13.4.1
condition: variables.isMac
- bash: |
set -e
cmake -Bbuild $(cmakeArguments)
displayName: all - configure with cmake
- bash: |
set -e
cmake --build build --config $(cmakeConfig) --target $(cmakeTarget) --parallel 8
displayName: all - build with cmake
condition: not(variables.needsLV2)
- bash: |
set -e
export SURGE_DATA_HOME=`pwd`/resources/data
cmake --build build --config $(cmakeConfig) --target $(cmakeTarget) --parallel 8
displayName: all - build with cmake
condition: variables.needsLV2
#- bash: |
# set -e
# echo "Surge.component"
# lipo -archs build/surge_products/Surge.component/Contents/MacOS/Surge
# displayName: mac - lipo the AU
# condition: variables.isMacFat
- bash: |
set -e
mkdir -p "${LOCALAPPDATA}/Surge XT/"
cd resources/data && tar cf - . | ( cd "${LOCALAPPDATA}/Surge XT" && tar xf - ) && cd ../..
ls -l "${LOCALAPPDATA}/Surge XT/"
build/src/surge-testrunner/Release/surge-testrunner.exe
condition: variables.isWindowsUnitTest
displayName: windows - run unit tests
- bash: |
set -e
export PATH=$AGENT_TEMPDIRECTORY:$PATH
export SURGE_DATA_HOME=`pwd`/resources/data
./build/src/surge-testrunner/surge-testrunner
condition: variables.isLinuxUnitTest
displayName: linux - run unit test
- bash: |
set -e
export PATH=$AGENT_TEMPDIRECTORY:$PATH
export SURGE_DATA_HOME=`pwd`/resources/data
./build/src/surge-testrunner/Release/surge-testrunner
condition: variables.isMacUnitTest
displayName: macOS - run unit tests
- job: NotifyReleases
dependsOn: Build
condition: succeeded()
pool:
vmImage: 'ubuntu-20.04'
steps:
- checkout: none
- task: DownloadSecureFile@1
inputs:
secureFile: notify-releases.sh
- task: DownloadSecureFile@1
inputs:
secureFile: notify-xt-releases.sh
- bash: |
echo "Notifying releases for branch: $BUILD_SOURCEBRANCH"
# remove refs/heads/
export BRANCH="${BUILD_SOURCEBRANCH/refs\/heads\/}"
if ! [[ $BRANCH =~ ^(main|release-xt/.+)$ ]]; then
exit
fi
echo "Launching the XT Release Build"
. $AGENT_TEMPDIRECTORY/notify-xt-releases.sh $BRANCH
displayName: Notify Releases