forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
247 lines (207 loc) · 7.19 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
# Surge synth build script
# https://aka.ms/yaml
trigger:
- main
- release/*
pr:
- main
jobs:
- job: Build
strategy:
matrix:
macOS:
imageName: 'macos-10.14'
isMac: True
isMacUnitTest: True
cmakeArguments: "-GXcode"
cmakeTarget: "all-components"
macOS-fat:
imageName: 'macos-10.15'
isMac: True
isMacFat: True
cmakeArguments: "-GXcode -D\"CMAKE_OSX_ARCHITECTURES=arm64;x86_64\""
cmakeTarget: "Surge-AU-Packaged"
xcodePath: "/Applications/Xcode_12.2.app"
macOS-fxbank:
imageName: 'macos-10.15'
isMac: True
cmakeArguments: "-GXcode -DBUILD_SURGE_JUCE_PLUGINS=True"
cmakeTarget: "Surge-Effects-Bank-Packaged"
windows-x64:
imageName: 'windows-2019'
isWindows: True
cmakeArguments: "-A x64"
cmakeTarget: "Surge-VST3-Packaged"
windows-x86-vs2017:
imageName: 'vs2017-win2016'
isWindows: True
cmakeArguments: "-A Win32"
cmakeTarget: "Surge-VST3-Packaged"
windows-unittest:
imageName: 'vs2017-win2016'
isWindows: True
isWindowsUnitTest: True
cmakeArguments: "-A x64"
cmakeTarget: "surge-headless"
windows-fxbank:
imageName: 'windows-2019'
isWindows: True
cmakeArguments: "-A x64 -DBUILD_SURGE_JUCE_PLUGINS=True"
cmakeTarget: "Surge-Effects-Bank-Packaged"
linux-vst3:
imageName: 'ubuntu-20.04'
isLinux: True
aptGetExtras: ""
cmakeArguments: "-GNinja"
cmakeTarget: "Surge-VST3-Packaged"
linux-lv2-ubuntu18:
imageName: 'ubuntu-18.04'
isLinux: True
aptGetExtras: ""
cmakeArguments: "-GNinja"
cmakeTarget: "Surge-LV2-Packaged"
linux-fxbank:
imageName: 'ubuntu-20.04'
isLinux: True
cmakeArguments: "-GNinja -DBUILD_SURGE_JUCE_PLUGINS=True"
cmakeTarget: "Surge-Effects-Bank-Packaged"
linux-clang:
imageName: 'ubuntu-20.04'
isLinux: True
aptGetExtras: "clang"
cmakeArguments: "-GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
cmakeTarget: "Surge-LV2-Packaged"
linux-arm-cross:
imageName: 'ubuntu-20.04'
isLinux: True
isLinuxARM: True
aptGetExtras: "libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf"
cmakeArguments: "-GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/linux-arm-ubuntu-crosscompile-toolchain.cmake"
cmakeTarget: "surge-headless"
linux-unittest:
imageName: 'ubuntu-20.04'
isLinux: True
isLinuxUnitTest: True
cmakeArguments: ""
cmakeTarget: "surge-headless"
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 "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
export SURGE_VERSION=$(cat VERSION)
echo "SURGE_VERSION=$SURGE_VERSION"
echo "##vso[task.setvariable variable=SURGE_VERSION]$SURGE_VERSION"
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
sudo xcode-select -s $(xcodePath)
displayName: mac - run xcode-select
condition: variables.isMacFat
- bash: |
set -e
cmake -Bbuild $(cmakeArguments)
displayName: all - configure with cmake
- bash: |
set -e
cmake --build build --config Release --target $(cmakeTarget)
displayName: all - build with cmake
- 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/"
cd resources/data && tar cf - . | ( cd ${LOCALAPPDATA}/Surge && tar xf - ) && cd ../..
ls -l "${LOCALAPPDATA}/Surge/"
build/Release/surge-headless.exe
condition: variables.isWindowsUnitTest
displayName: windows - run unit tests
- bash: |
set -e
export PATH=$AGENT_TEMPDIRECTORY:$PATH
echo "Running HeadlessTest"
export XDG_DATA_HOME=$AGENT_TEMPDIRECTORY/XH
mkdir -p $XDG_DATA_HOME
rsync -r --delete "resources/data/" "$XDG_DATA_HOME/surge/"
./build/surge-headless
condition: variables.isLinuxUnitTest
displayName: linux - run unit test
- bash: |
set -e
export PATH=$AGENT_TEMPDIRECTORY:$PATH
mkdir "$HOME/Library/Application Support/Surge"
rsync -r --delete "resources/data/" "$HOME/Library/Application Support/Surge/"
./build/Release/surge-headless
condition: variables.isMacUnitTest
displayName: macOS - run unit tests
- job: NotifyReleases
dependsOn: Build
condition: succeeded()
steps:
- checkout: none
- task: DownloadSecureFile@1
inputs:
secureFile: notify-releases.sh
- bash: |
echo "Notifying releases for branch: $BUILD_SOURCEBRANCH"
# remove refs/heads/
export BRANCH="${BUILD_SOURCEBRANCH/refs\/heads\/}"
if ! [[ $BRANCH =~ ^(main|release/.+)$ ]]; then
exit
fi
. $AGENT_TEMPDIRECTORY/notify-releases.sh $BRANCH
displayName: Notify Releases