forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
265 lines (228 loc) · 7.7 KB
/
appveyor.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
---
version: '{branch}-{build}'
skip_tags: true
max_jobs: 1
image:
- Visual Studio 2017
- Ubuntu1804
configuration:
- release-fastbuild
- release
# - debug
platform:
# Disable x86 builds since we only get one concurrent build on AppVeyor and x86
# failures will be caught by Jenkins.
# - x86
- x64
matrix:
exclude:
# Ubuntu doesn't support "release-fastbuild".
- image: Ubuntu1804
configuration: release-fastbuild
# We only want "release-fastbuild" for Windows since "release" consumes too
# much memory due to link-time code generation / whole-program optimization.
- image: Visual Studio 2017
configuration: release
skip_commits:
files:
- doc/
- .travis.yml
- LICENSE
- README
- README.md
- CHANGELOG
- COPYING
- CODE_OF_CONDUCT.md
for:
########## UBUNTU SPECIFIC CONFIGURATION ##########
-
matrix:
only:
- image: Ubuntu1804
clone_folder: /home/appveyor/projects/mixxx
cache:
- /home/appveyor/.ccache
install:
- sudo apt-get update
- sudo apt-get -y install
ccache
gdb
libavformat-dev
libchromaprint-dev
libfaad-dev
libflac-dev
libid3tag0-dev
liblilv-dev
libmad0-dev
libmodplug-dev
libmp3lame-dev
libmp4v2-dev
libopus-dev
libopusfile-dev
libportmidi-dev
libprotobuf-dev
libqt5opengl5-dev
libqt5sql5-sqlite
libqt5svg5-dev
libqt5x11extras5-dev
librubberband-dev
libshout3-dev
libsndfile1-dev
libsoundtouch-dev
libsqlite3-dev
libtag1-dev
libupower-glib-dev
libusb-1.0-0-dev
libwavpack-dev
portaudio19-dev
protobuf-compiler
python-pip
qt5-default
qt5keychain-dev
qtscript5-dev
xsltproc
- sudo pip install cmake
before_build:
# Limit cache size to 100 MB
- ccache -M 100M
- ccache -c
- ccache -s
build_script:
- export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)"
- mkdir cmake_build
- cd cmake_build
- cmake
-L
-DFAAD=ON
-DHSS1394=OFF
-DLOCALECOMPARE=ON
-DMAD=ON
-DMODPLUG=ON
-DOPUS=ON
-DWAVPACK=ON
..
- cmake --build .
- sudo cmake --build . --target install
test_script:
- export CTEST_OUTPUT_ON_FAILURE=1
- xvfb-run -- ctest -T test --no-compress-output
- xvfb-run -- cmake --build . --target benchmark
after_test:
- xsltproc -o ctest-to-junit-results.xml ../cmake/ctest-to-junit.xsl Testing/*/Test.xml
- curl -F 'file=@ctest-to-junit-results.xml' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"
########## END UBUNTU SPECIFIC CONFIGURATION ##########
########## WINDOWS SPECIFIC CONFIGURATION ##########
-
matrix:
only:
- image: Visual Studio 2017
fast_finish: false # set this flag to true to immediately finish build once one of the jobs fails.
init:
- git config --global core.autocrlf input
# Uncomment the following line to show RDP info at beginning of job
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
clone_folder: c:\projects\mixxx
cache:
- C:\mixxx-buildserver
- C:\Users\appveyor\clcache
environment:
ENVIRONMENTS_URL: https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/
ENVIRONMENTS_PATH: C:\mixxx-buildserver
ENVIRONMENT_NAME: 2.3-j00013-PLATFORM-CONFIGURATION-static-36f44bd2-minimal
QT_VERSION: 5.12.0
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community"
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
install:
- set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:PLATFORM=%platform%%%
- set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:CONFIGURATION=%configuration%%%
- set WINLIB_PATH=%ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%
- IF EXIST %WINLIB_PATH% (
echo Using cached environment %WINLIB_PATH%...
) else (
mkdir %ENVIRONMENTS_PATH% &&
echo Downloading environment %ENVIRONMENT_NAME%... &&
curl -fsS -L -o%ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%.zip %ENVIRONMENTS_URL%/%ENVIRONMENT_NAME%.zip &&
echo Unpacking environment %ENVIRONMENT_NAME% to %ENVIRONMENTS_PATH%... &&
7z -o%ENVIRONMENTS_PATH% x %ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%.zip || exit 1
)
- choco install ninja
- python -m pip install git+https://github.com/frerich/clcache.git
before_build:
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- set QT_PATH=%WINLIB_PATH%\Qt-%QT_VERSION%
- set CMAKE_BUILD_PARALLEL_LEVEL=%NUMBER_OF_CORES%
- call "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
- cd %APPVEYOR_BUILD_FOLDER%
# Limit cache size to 100 MB
- clcache -M 100000000
- clcache -c
- clcache -s
# Improve clcache performance
- set CLCACHE_SERVER=1
- set CLCACHE_HARDLINK=1
- ps: Start-Process clcache-server
build_script:
- mkdir cmake_build
- cd cmake_build
- cmake
-L
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=C:\mixxx
-DCMAKE_PREFIX_PATH=%WINLIB_PATH%;%QT_PATH%
-DMEDIAFOUNDATION=ON
-DOPUS=ON
-DLOCALECOMPARE=ON
-DSTATIC_DEPS=ON
-G "Ninja"
..
- cmake --build .
- cmake --build . --target install
# Generate EXE/MSI installers
- cpack -G "NSIS"
- cpack -G "WIX"
test_script:
# Calling mixxx-test under bash to have standard output and use stdbuf to
# unbuffer standard & error output
- set CTEST_OUTPUT_ON_FAILURE=1
- ctest -C "Release" -T test --no-compress-output
- cmake --build . --target benchmark
after_test:
# Found at https://help.appveyor.com/discussions/suggestions/5298-support-ctest-xml-test-results
- ps: |
$ctest_xml = Get-ChildItem -Path Testing\*\Test.xml
$ctest_to_junit_xsl = Get-ChildItem -Path ..\cmake\ctest-to-junit.xsl
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
$XSLInputElement.Load($ctest_to_junit_xsl)
$XSLInputElement.Transform((Resolve-Path $ctest_xml), (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))
artifacts:
- path: 'cmake_build/*.exe'
- path: 'cmake_build/*.msi'
on_finish:
# Uncomment the following line if you don't want the build VM to be destroyed
# and be able to RDP on it until a special “lock” file on VM desktop is deleted
# The RDP session is limited by overall build time (60 min).
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
########## END WINDOWS SPECIFIC CONFIGURATION ##########
on_success:
- echo "*** SUCCESS ***"
on_failure:
- echo "*** FAILURE ***"
on_finish:
- echo "*** DONE ***"
deploy:
- provider: Environment
name: downloads.mixxx.org
notifications:
- provider: Webhook
url: https://mixxx.zulipchat.com/api/v1/messages
method: POST
content_type: application/x-www-form-urlencoded
headers:
Authorization:
secure: 95cbVBcC4rogjE5VNdhuYm8cnjPF8+7SeQXySqcxAqrFZxK+/Kcn3Q2hRb2iZfUEKZ+EdCYwx7EbpZdSiZc5goAuJT+/QXXT/Ls+fzc+eSy4Sz1Ic5t2BjLhmYZLdnBL3uIVceNSb8GzYPQx0+xy7g==
on_build_success: true
on_build_failure: true
on_build_status_changed: true
body: "type=stream&to=appveyor&subject={{projectName}} Build {{buildVersion}} {{status}}&content=Build {{buildVersion}} {{status}}{{#isPullRequest}} (PR #{{pullRequestId}}) {{/isPullRequest}}{{#failed}} :cross_mark:{{/failed}}{{#passed}} :check_mark:{{/passed}} {{buildUrl}}"