forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
210 lines (169 loc) · 5.92 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
# Surge synth build script
# https://aka.ms/yaml
trigger:
- master
- release/*
pr:
- master
jobs:
- job: Build
strategy:
matrix:
macOS:
imageName: 'macos-10.13'
isMac: True
windows-x64-plugins:
imageName: 'vs2017-win2016'
isWindows: True
is64Bit: True
windows-x86-plugins:
imageName: 'vs2017-win2016'
isWindows: True
is32Bit: True
windows-unittest:
imageName: 'vs2017-win2016'
isWindowsUnitTest: True
linux-lv2:
imageName: 'ubuntu-16.04'
isLinux: True
linuxProject: lv2
linux-vst3:
imageName: 'ubuntu-16.04'
isLinux: True
linuxProject: vst3
linux-unittest:
imageName: 'ubuntu-16.04'
isLinux: True
linuxProject: headless
runHeadless: True
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 "MAKE ASSETS = " $MAKEASSETS
displayName: all - details on build
- bash: |
# do this here, because we're using a shallow clone and it fails using `submodules: recursive` above
git submodule update --init --recursive
export SURGE_VERSION=$(cat VERSION)
echo "SURGE_VERSION=$SURGE_VERSION"
echo "##vso[task.setvariable variable=SURGE_VERSION]$SURGE_VERSION"
displayName: all - submodule init
- bash: |
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_MAC=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-macosx.tar.gz
curl -L $PREMAKE_MAC --output premake5.tar.gz
tar zxvf premake5.tar.gz
popd
export PATH=$AGENT_TEMPDIRECTORY:$PATH
./build-osx.sh --build --verbose
ls -alFh target
ls -alFh products
condition: variables.isMac
displayName: macOS - build all assets
- bash: |
export PATH=$AGENT_TEMPDIRECTORY:$PATH
mkdir "$HOME/Library/Application Support/Surge"
rsync -r --delete "resources/data/" "$HOME/Library/Application Support/Surge/"
./build-osx.sh --build-headless
./build/Release/surge-headless
condition: variables.isMac
displayName: macOS - run unit tests
- bash: |
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_WINDOWS=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-windows.zip
curl -L $PREMAKE_WINDOWS --output premake5.zip
unzip premake5.zip
popd
export PATH=$AGENT_TEMPDIRECTORY:$PATH
premake5 vs2017
ls -alFh
condition: variables.isWindows
displayName: windows - setup premake for plugins
- task: MSBuild@1
inputs:
solution: 'buildtask.xml'
maximumCpuCount: true
platform: 'x64'
condition: and(variables.isWindows,variables.is64Bit)
displayName: windows - build x64 plugins
- task: MSBuild@1
inputs:
solution: 'buildtask.xml'
maximumCpuCount: true
platform: 'Win32'
condition: and(variables.isWindows,variables.is32Bit)
displayName: windows - build x86 plugins
# https://github.com/Microsoft/azure-pipelines-tasks/issues/9737
- script: |
pushd "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
for /f "delims=" %%x in ('.\vswhere.exe -latest -property InstallationPath') do set VSPATH=%%x
popd
call "%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G "Visual Studio 15 2017 Win64"
condition: variables.isWindowsUnitTest
displayName: windows - run cmake
- task: MSBuild@1
inputs:
solution: 'build\surge-headless.vcxproj'
maximumCpuCount: true
platform: 'x64'
msbuildVersion: '15.0'
configuration: 'Release'
condition: variables.isWindowsUnitTest
displayName: windows - build unit tests
- bash: |
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: |
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_LINUX=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-linux.tar.gz
curl -L $PREMAKE_LINUX --output premake5.tar.gz
tar zxvf premake5.tar.gz
export PATH=$AGENT_TEMPDIRECTORY:$PATH
popd
sudo apt-get install -y xcb
sudo apt-get install -y libxcb-util-dev
sudo apt-get install -y libxcb-cursor-dev
sudo apt-get install -y libxcb-keysyms1-dev
sudo apt-get install -y libxkbcommon-dev
sudo apt-get install -y libxkbcommon-x11-dev
sudo apt-get install -y devscripts
echo "Building $(linuxProject)"
./build-linux.sh clean && ./build-linux.sh build --project=$(linuxProject)
condition: variables.isLinux
displayName: linux - build plugin
- bash: |
export PATH=$AGENT_TEMPDIRECTORY:$PATH
echo "Running HeadlessTest $(linuxProject)"
export XDG_DATA_HOME=$AGENT_TEMPDIRECTORY/XH
mkdir -p $XDG_DATA_HOME
rsync -r --delete "resources/data/" "$XDG_DATA_HOME/Surge/"
./target/headless/Release/Surge/Surge-Headless
condition: and(variables.isLinux,variables.runHeadless)
displayName: linux - build and run unit test
- 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 =~ ^(master|release/.+)$ ]]; then
exit
fi
. $AGENT_TEMPDIRECTORY/notify-releases.sh $BRANCH
displayName: Notify Releases