forked from AuburnSounds/Dplug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
288 lines (246 loc) · 9.06 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# Common variables for all platforms (ldc is hardcoded in windows job)
variables:
DC: ldc
DVersion: 1.17.0
arch: x64
# Trigger on new commit or tag. By default tags aren't built
trigger:
- '*'
- refs/tags/v*
# Nightly builds
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
- releases/*
#
# LINUX
#
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
fetchDepth: 1
# Uncomment these DownloadSecureFile tasks + script to use secure files. Or delete if not needed
- task: DownloadSecureFile@1
name: aeffect
inputs:
secureFile: 'aeffect'
- task: DownloadSecureFile@1
name: aeffectx
inputs:
secureFile: 'aeffectx'
# Creates VST2_SDK\pluginterfaces\vst2.x folder and copies aeffect.h and aeffectx.h there
- script: |
set -ex
mkdir -vp VST2_SDK/pluginterfaces/vst2.x
cp $(aeffect.secureFilePath) VST2_SDK/pluginterfaces/vst2.x/aeffect.h
cp $(aeffectx.secureFilePath) VST2_SDK/pluginterfaces/vst2.x/aeffectx.h
displayName: Download secure files
# Installs libx11-dev package, ldc, dub, dplug-build
- script: |
# exit as soon as any line in the bash script fails
set -ex
export VST2_SDK="$(pwd)/VST2_SDK"
# There is no permissions in default directory for system changes, so make sure to cd ..
cd ..
# Install libs
sudo apt-get -yq install libx11-dev
# Install compiler
curl -fsS https://dlang.org/install.sh | bash -s $(DC)-$(DVersion) -a
~/dlang/install.sh list
source ~/dlang/$(DC)-$(DVersion)/activate
ldc2 --version
dub --version
# Install dplug-build
git clone --depth 1 https://github.com/AuburnSounds/Dplug dplug
cd dplug/tools/dplug-build
dub build
sudo ln -sf $(pwd)/dplug-build /usr/bin/dplug-build
# Install process
cd ../process
dub build
sudo ln -sf $(pwd)/process /usr/bin/process
displayName: Install
- script: |
set -ex
# Environment variables are not preserved between steps.
source ~/dlang/$(DC)-$(DVersion)/activate
export VST2_SDK="$(pwd)/VST2_SDK"
# Here you can customize the flags, or build multiple plugins
cd examples/distort
dplug-build --no-color -c VST -c VST3 -c LV2
cd ../..
cd examples/clipit
dplug-build --no-color -c VST -c VST3 -c LV2
cd ../..
displayName: Build plug-ins
- script: |
set -ex
process examples/distort/builds/Linux-64b-VST/Witty\ Audio\ Destructatorizer.so -t 10
process examples/clipit/builds/Linux-64b-VST/Witty\ Audio\ CLIP\ It.so -t 10
displayName: Test loading plug-ins
# This task uploads the builds directory that contains all artifacts produced by dplug-build
# You may need to repeat this for each plugin that you build
# Pattern matching is not supported here
- upload: $(System.DefaultWorkingDirectory)/examples/distort/builds/
artifact: distort-linux
- upload: $(System.DefaultWorkingDirectory)/examples/clipit/builds/
artifact: clipit-linux
#
# MACOS
#
- job: Mac
pool:
vmImage: 'macOS-latest'
variables:
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- checkout: self
fetchDepth: 1
# Uncomment these DownloadSecureFile tasks + script to use secure files. Or delete if not needed
- task: DownloadSecureFile@1
name: aeffect
inputs:
secureFile: 'aeffect'
- task: DownloadSecureFile@1
name: aeffectx
inputs:
secureFile: 'aeffectx'
# Creates VST2_SDK\pluginterfaces\vst2.x folder and copies aeffect.h and aeffectx.h there
- script: |
set -ex
mkdir -vp VST2_SDK/pluginterfaces/vst2.x
cp $(aeffect.secureFilePath) VST2_SDK/pluginterfaces/vst2.x/aeffect.h
cp $(aeffectx.secureFilePath) VST2_SDK/pluginterfaces/vst2.x/aeffectx.h
displayName: Download secure files
# Installs ldc, dub, dplug-build
- script: |
# exit as soon as any line in the bash script fails
set -ex
export VST2_SDK="$(pwd)/VST2_SDK"
# There is no permissions in default directory for system changes, so make sure to cd ..
cd ..
brew update
brew install gpg
# Install compiler
curl -fsS https://dlang.org/install.sh | bash -s $(DC)-$(DVersion) -a
~/dlang/install.sh list
source ~/dlang/$(DC)-$(DVersion)/activate
ldc2 --version
dub --version
# Install dplug-build
git clone --depth 1 https://github.com/AuburnSounds/Dplug dplug
cd dplug/tools/dplug-build
dub build
# Install process
cd ../process
dub build
displayName: Install
- script: |
set -ex
# Environment variables are not preserved between steps.
source ~/dlang/$(DC)-$(DVersion)/activate
export VST2_SDK="$(pwd)/VST2_SDK"
# Here you can customize the flags, or build multiple plugins
cd examples/distort
../../../dplug/tools/dplug-build/dplug-build --no-color -c VST -c VST3 -c AU
cd ../..
cd examples/clipit
../../../dplug/tools/dplug-build/dplug-build --no-color -c VST -c VST3 -c AU
cd ../..
displayName: Build plug-ins
- script: |
set -ex
../dplug/tools/process/process examples/distort/builds/macOS-64b-VST/Witty\ Audio\ Destructatorizer.vst/Contents/MacOS/Witty\ Audio\ Destructatorizer -t 10
../dplug/tools/process/process examples/clipit/builds/macOS-64b-VST/Witty\ Audio\ CLIP\ It.vst/Contents/MacOS/Witty\ Audio\ CLIP\ It -t 10
displayName: Test loading plug-ins
# This task uploads the builds directory that contains all artifacts produced by dplug-build
# You may need to repeat this for each plugin that you build
# Pattern matching is not supported here
- upload: $(System.DefaultWorkingDirectory)/examples/distort/builds/
artifact: distort-mac
- upload: $(System.DefaultWorkingDirectory)/examples/clipit/builds/
artifact: clipit-mac
#
# WINDOWS
#
- job: Windows
pool:
vmImage: 'windows-latest'
variables:
VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
ARCH: x64
steps:
- checkout: self
fetchDepth: 1
# Uncomment these DownloadSecureFile tasks + script to use secure files. Or delete if not needed
- task: DownloadSecureFile@1
name: aeffect
inputs:
secureFile: 'aeffect'
- task: DownloadSecureFile@1
name: aeffectx
inputs:
secureFile: 'aeffectx'
- script: |
echo on
mkdir VST2_SDK\pluginterfaces\vst2.x
echo $(aeffect.secureFilePath)
COPY $(aeffect.secureFilePath) VST2_SDK\pluginterfaces\vst2.x\aeffect.h
COPY $(aeffectx.secureFilePath) VST2_SDK\pluginterfaces\vst2.x\aeffectx.h
displayName: Download secure files
- powershell: |
echo on
cd ..
# Download dplug
git clone --depth 1 https://github.com/AuburnSounds/Dplug dplug
# Download compiler
$version = $env:DVersion;
$url = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-multilib.7z";
Invoke-WebRequest $url -OutFile "compiler.archive";
7z x compiler.archive > $null;
Rename-Item ldc2-$($version)-windows-multilib ldc2;
displayName: Download dplug and ldc
- script: |
echo on
set VST2_SDK=%CD%/VST2_SDK
cd ..
set PATH=%CD%\ldc2\bin;%PATH%
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
pushd dplug\tools\dplug-build
dub build
popd
copy dplug\tools\dplug-build\dplug-build.exe ldc2\bin\dplug-build.exe
pushd dplug\tools\process
dub build
popd
copy dplug\tools\process\process.exe ldc2\bin\process.exe
displayName: Build dplug-build
- script: |
echo on
set PATH=%CD%/../ldc2/bin;%PATH%
set VST2_SDK=%CD%/VST2_SDK
call "%VSINSTALLDIR%Common7\Tools\VsDevCmd.bat" -arch=%ARCH%
# Here ldc2, dub and dplug-build tools are available. Customize as needed
cd examples\distort
dplug-build --no-color -a x86_64 -c VST -c VST3
cd ..\..
cd examples\clipit
dplug-build --no-color -a x86_64 -c VST -c VST3
cd ..\..
displayName: Build plug-ins
- script: |
echo on
set PATH=%CD%/../ldc2/bin;%PATH%
process "examples\distort\builds\Windows-64b-VST\Witty Audio Destructatorizer-64.dll" -t 10
process "examples\clipit\builds\Windows-64b-VST\Witty Audio CLIP It-64.dll" -t 10
displayName: Test loading plug-ins
- upload: $(System.DefaultWorkingDirectory)/examples/distort/builds/
artifact: distort-windows
- upload: $(System.DefaultWorkingDirectory)/examples/clipit/builds/
artifact: clipit-windows