blob: ebbc68a195e0f6ddbd484f649977b8ee94658809 (
plain)
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
|
# Enable build config validation (opt-in)
version: ~> 1.0
# Default build environment
os: linux
dist: bionic
# Default programming language
language: cpp
# Build flags common to OS X and Linux.
# Parallel builds are important for avoiding OSX build timeouts.
# We turn off verbose output to avoid going over the 4MB output limit.
env:
global:
# For SCons builds
- SCONSFLAGS="battery=1 bulk=1 debug_assertions_fatal=1 hid=1 hss1394=0 lilv=1 opus=1 qtkeychain=1 shoutcast=1 test=1 verbose=0 vinylcontrol=1 virtualize=0"
# For CMake builds
# TODO: Set -DDEBUG_ASSERTIONS_FATAL=OFF before deploying CI builds as releases!!!
- CMAKEFLAGS="-DCMAKE_BUILD_TYPE=Release -DBATTERY=ON -DBROADCAST=ON -DBULK=ON -DDEBUG_ASSERTIONS_FATAL=ON -DHID=ON -DLILV=ON -DOPUS=ON -DQTKEYCHAIN=ON -DVINYLCONTROL=ON"
- GTEST_COLOR=1
- CTEST_OUTPUT_ON_FAILURE=1
# Render analyzer waveform tests to an offscreen buffer
- QT_QPA_PLATFORM=offscreen
# DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD for deploys.
- secure: aS40s8gx1mM01oRj2pskFqR+rBID1nnTY7hwSqkT1bgJT+JF0tMZt/SkMjR08bp+3soNbBtqJgZKAhQ6Tts2DtkWQGbUiXgU5QpowUcecTxge/jqxZeWdJWThpB+qWs70Fm0QhzZXIyBPM8EGljWbLum5ncR7AUBEasRboNZ0P8=
# Code signing secrets:
- MACOS_CODESIGN_CERTIFICATE=cmake/macos_developer_id_codesign_certificate.p12
# MACOS_CODESIGN_CERTIFICATE_PASSWORD:
- secure: MnQzTJBkeHsRkNov7yoNIlEM5Exo6JvdmRS+z6OPQFuJn+yc8WyeUrW2JhVtVsGFO/fCqcIyymIOSFIEz78eoRj1PL0w2tj3ptBqUAJWupP2mmobKcPY3NYTOhOmOsv8rqlJbPdLxop1pyLaLBFWyGKOgI2xJz8LPHGN5ZINfCY=
# MACOS_CODESIGN_OPENSSL_PASSWORD:
- secure: NJegC0Dag0V8hotFB7u3rSPGnGQzp0JQpRTH1qL8bveUmrTOL26viPeX4vLXwn/RJKZkuUsDBxDSFy/sfVvfaLdAgd5USOV9QLF7lc3z1+t4BWbZ4xDBXCYOWuaQlgqE1k5W7s9wl1DgDFNxBSc46X04h9BZNonz1z0A9IAhn+k=
jobs:
include:
- name: Ubuntu/gcc/SCons build
compiler: gcc
# Ubuntu Bionic build prerequisites
before_install:
- sudo apt install -y scons
install:
# TODO for Ubuntu Focal: faad=0 ffmpeg=1
- scons -j "$(nproc)" faad=1 ffmpeg=0 localecompare=1 mad=1 modplug=1 wv=1
script:
# NOTE(sblaisot): 2018-01-02 removing gdb wrapper on linux due to a bug in
# return code in order to avoid having a successful build when a test fail.
# https://bugs.launchpad.net/mixxx/+bug/1699689
- ./mixxx-test --logLevel info
- name: Ubuntu/gcc/CMake build
compiler: gcc
cache: ccache
# Ubuntu Bionic build prerequisites
# TODO for Ubuntu Focal: Replace "-DFAAD=ON" with "-DFFMPEG=ON"
env: CMAKEFLAGS_EXTRA="-DFAAD=ON -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON -DWARNINGS_FATAL=ON"
before_install:
- export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)"
- export CTEST_PARALLEL_LEVEL="$(nproc)"
- export PATH="$HOME/.local/bin:$PATH"
- pip install --user cmake
- cmake --version
- ccache -s
install:
- mkdir cmake_build
- cd cmake_build
- cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA ..
- cmake --build .
- cpack -G DEB
script:
# Run tests and benchmarks
- ctest --timeout 45
- cmake --build . --target benchmark
- name: OSX/clang/SCons build
os: osx
# The XCode version should match that on the build server!
osx_image: xcode9.4
compiler: clang
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
addons:
homebrew:
update: true
packages:
- chromaprint
- flac
- lame
- libsndfile
- libogg
- libvorbis
- libshout
- libid3tag
- libmad
- lilv
- opusfile
- portaudio
- portmidi
- protobuf
- qt5
- qtkeychain
- rubberband
- sound-touch
- taglib
# Workaround for bug in libopus's opus.h including <opus_multistream.h>
# instead of <opus/opus_multistream.h>.
env: >-
CFLAGS="-isystem /usr/local/include/opus"
CXXFLAGS="-isystem /usr/local/include/opus"
before_install:
- brew install scons
- export QTDIR="$(find /usr/local/Cellar/qt -d 1 | tail -n 1)"
- echo "QTDIR=$QTDIR"
install:
# We are hardcoding 4 threads here since "$(sysctl -n hw.ncpu)" only
# returns 2 and makes the travis job run into a timeout:
# https://docs.travis-ci.com/user/reference/overview/#virtualization-environments
- scons -j4 coreaudio=1
script:
# lldb doesn't provide an easy way to exit 1 on error:
# https://bugs.llvm.org/show_bug.cgi?id=27326
- lldb ./mixxx-test --batch -o run -o quit -k 'thread backtrace all' -k "script import os; os._exit(1)" -- --logLevel info
before_cache:
# Avoid indefinite cache growth
- brew cleanup
# Cache only .git files under "/usr/local/Homebrew" so "brew update"
# does not take 5min every build
# Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12
- find /usr/local/Homebrew \! -regex ".+\.git.+" -delete
- name: OSX/clang/CMake build
os: osx
# The XCode version should match that on the build server!
osx_image: xcode9.4
compiler: clang
cache:
ccache: true
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
# Workaround for bug in libopus's opus.h including <opus_multistream.h>
# instead of <opus/opus_multistream.h>.
# Virtual X (Xvfb) is needed for analyzer waveform tests
addons:
homebrew:
update: true
packages:
- ccache
env: >-
MIXXX_ENVPATH="${HOME}/buildenv"
CMAKEFLAGS_EXTRA="-DCOREAUDIO=ON -DHSS1394=ON"
PATH="/usr/local/opt/ccache/bin:$PATH"
CMAKE_BUILD_PARALLEL_LEVEL=4
CTEST_PARALLEL_LEVEL=1
before_install:
# Print some information about CMake and ccache
- cmake --version
- ccache -s
# Download and prepare our build environment
- mkdir "${MIXXX_ENVPATH}"
- read -r MIXXX_ENVNAME < build/osx/golden_environment
- curl "https://downloads.mixxx.org/builds/buildserver/2.3.x-macosx/${MIXXX_ENVNAME}.tar.gz" | tar xzf - --strip 1 -C "${MIXXX_ENVPATH}"
# FIXME: This fixes some wrong hardcoded paths inside pkg-config files of the build environment (e.g. in "lib/pkgconfig/taglib.pc")
# This will only work if neither MIXXX_ENVNAME nor MIXXX_ENVPATH contain special regex characters!
- find "${MIXXX_ENVPATH}" -name "*.pc" -or -path "*/bin/taglib-config" -exec sed -i".orig" -e "s|/Users/mixxx/bs-2.3-mac/amd64/environment/${MIXXX_ENVNAME}|${MIXXX_ENVPATH}|g" {} \;
- export QT_DIR="$(find "${MIXXX_ENVPATH}" -type d -path "*/cmake/Qt5")"
- export QT_QPA_PLATFORM_PLUGIN_PATH="$(find "${MIXXX_ENVPATH}" -type d -path "*/plugins")"
- |
if [ "$TRAVIS_REPO_SLUG" = "mixxxdj/mixxx" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
# Create a temporary keychain for the certificate and import it.
openssl enc -aes-256-cbc -d -md sha512 -k ${MACOS_CODESIGN_OPENSSL_PASSWORD} -in ${MACOS_CODESIGN_CERTIFICATE}.enc -out ${MACOS_CODESIGN_CERTIFICATE};
security create-keychain -p mixxx Mixxx.keychain;
security unlock-keychain -p mixxx Mixxx.keychain;
security import ${MACOS_CODESIGN_CERTIFICATE} -k Mixxx.keychain -P ${MACOS_CODESIGN_CERTIFICATE_PASSWORD} -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -k mixxx Mixxx.keychain
# Add keychain to search list
security list-keychains -s Mixxx.keychain;
export APPLE_CODESIGN_IDENTITY=2C2B5D3EDCE82BA55E22E9A67F16F8D03E390870;
fi
install:
- mkdir cmake_build
- cd cmake_build
- cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA -DMACOS_BUNDLE=ON -DCMAKE_PREFIX_PATH=${MIXXX_ENVPATH} -DQt5_DIR=${QT_DIR} -DAPPLE_CODESIGN_IDENTITY=${APPLE_CODESIGN_IDENTITY} ..
- cmake --build .
- cpack -G DragNDrop -V
# cpack codesigns the Mixxx.app inside the DMG package, but the DMG package also needs to be signed
- |
if ! [ -z $APPLE_CODESIGN_IDENTITY ]; then
codesign --verbose=4 --deep --force --options runtime --sign $APPLE_CODESIGN_IDENTITY --entitlements ../build/osx/entitlements.plist *.dmg;
fi
script:
# Run tests and benchmarks
- ctest --timeout 45
- cmake --build . --target benchmark
before_cache:
# Cache only .git files under "/usr/local/Homebrew" so "brew update"
# does not take 5min every build
# Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12
- find /usr/local/Homebrew \! -regex ".+\.git.+" -delete
git:
depth: 1
# Common Addons
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libavformat-dev
- libchromaprint-dev
- libebur128-dev
- libfaad-dev
- libfftw3-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
- qt5-default
- qtscript5-dev
- qt5keychain-dev
notifications:
webhooks:
- https://mixxx.zulipchat.com/api/v1/external/travis?stream=travis&topic=build-status&api_key=$ZULIP_API_KEY
deploy:
provider: script
skip_cleanup: true
# Deploy is executed from cmake_build.
script: ../build/travis/deploy.sh
on:
all_branches: true
condition: "\"${TRAVIS_JOB_NAME}\" =~ CMake"
|