forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
222 lines (189 loc) · 7.14 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
# Surge synth build script
# https://aka.ms/yaml
trigger:
- main
- xt-alpha
- release-xt/*
pr:
- main
- release-xt/*
jobs:
- job: BuildCodeQuality
pool:
vmImage: 'ubuntu-20.04'
steps:
- checkout: self
fetchDepth: 1
# submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github
- bash: |
git submodule update --init --recursive
cmake -Bignore/cq -DSURGE_SKIP_JUCE_FOR_RACK=TRUE -DCMAKE_BUILD_TYPE=Debug -DSURGE_SKIP_LUA=TRUE
cmake --build ignore/cq --target code-quality-pipeline-checks
displayName: Do Codequal
- job: BuildForPR
condition: eq(variables['Build.Reason'], 'PullRequest')
variables:
defaultTargets: "surge-xt_Packaged surge-fx_Packaged"
strategy:
matrix:
macOS-unit-test:
imageName: 'macos-latest'
isMac: True
isMacUnitTest: True
isUnitTest: True
cmakeArguments: "-GNinja"
cmakeTarget: "surge-testrunner"
cmakeConfig: "Release"
windows-x86-32bit-msvc:
imageName: 'windows-2019'
isWindows: True
cmakeArguments: "-A Win32 -DCMAKE_BUILD_TYPE=Debug"
cmakeConfig: "Debug"
cmakeTarget: "surge-xt_CLAP" # just a subset for time
macOS-x86:
imageName: 'macos-latest'
isMac: True
isMacFat: True
cmakeArguments: "-GNinja -DCMAKE_BUILD_TYPE=Debug -D\"CMAKE_OSX_ARCHITECTURES=x86_64\""
cmakeTarget: $(defaultTargets)
cmakeConfig: "Debug"
macOS-arm:
imageName: 'macos-latest'
isMac: True
isMacFat: True
cmakeArguments: "-GNinja -DCMAKE_BUILD_TYPE=Debug -D\"CMAKE_OSX_ARCHITECTURES=arm64\""
cmakeTarget: $(defaultTargets)
cmakeConfig: "Debug"
#windows-x64-msvc:
# imageName: 'windows-2019'
# isWindows: True
# cmakeArguments: "-A x64 -DCMAKE_BUILD_TYPE=Debug"
# cmakeConfig: "Debug"
# cmakeTarget: $(defaultTargets)
windows-x64-clang:
imageName: 'windows-2022'
isWindows: True
cmakeArguments: "-GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug"
cmakeConfig: "Debug"
cmakeTarget: $(defaultTargets)
windows-unittest-clang:
imageName: 'windows-2022'
isWindows: True
isWindowsUnitTest: True
isUnitTest: True
cmakeArguments: "-GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Release"
cmakeConfig: "Release"
cmakeTarget: "surge-testrunner"
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-latest'
isLinux: True
isLinuxUnitTest: True
isUnitTest: True
cmakeArguments: "-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_COMPILER=gcc-12"
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: |
brew install ninja
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
- bash: |
set -e
cd build
ctest -j 4 || ctest --rerun-failed --output-on-failure
condition: variables.isUnitTest
displayName: all - run unit tests
- job: NotifyReleases
dependsOn: BuildCodeQuality
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest')))
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