blob: 3fcbad28c43b05a01c4b9fcc433197049aabf13f (
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
|
name: Build
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
include:
- name: Ubuntu 18.04 (gcc)
os: ubuntu-18.04
cmake_args: -DFAAD=ON -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON
cmake_generator: Unix Makefiles
ctest_args:
ccache_path: ~/.ccache
cpack_generator: DEB
buildenv_basepath: /home/runner/buildenv
buildenv_script: tools/ubuntu_buildenv.sh
artifacts_name: Ubuntu 18.04 DEB
artifacts_path: cmake_build/*.deb
qt_qpa_platform: offscreen
- name: Ubuntu 20.04 (gcc)
os: ubuntu-20.04
cmake_args: -DFFMPEG=ON -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON
cmake_generator: Unix Makefiles
ctest_args:
ccache_path: ~/.ccache
cpack_generator: DEB
buildenv_basepath: /home/runner/buildenv
buildenv_script: tools/ubuntu_buildenv.sh
artifacts_name: Ubuntu 20.04 DEB
artifacts_path: cmake_build/*.deb
qt_qpa_platform: offscreen
- name: macOS 10.15
os: macos-10.15
cmake_args: -DCOREAUDIO=ON -DHSS1394=ON -DMACOS_BUNDLE=ON
cmake_generator: Unix Makefiles
# TODO: Fix this broken test on macOS
ctest_args: --exclude-regex DirectoryDAOTest.relocateDirectory
cpack_generator: DragNDrop
ccache_path: /Users/runner/Library/Caches/ccache
buildenv_basepath: /Users/runner/buildenv
buildenv_script: tools/macos_buildenv.sh
artifacts_name: macOS DMG
artifacts_path: cmake_build/*.dmg
qt_qpa_platform: offscreen
- name: Windows 2016 (MSVC)
os: windows-2016
cmake_args: -DHSS1394=ON -DKEYFINDER=OFF -DLOCALECOMPARE=ON -DMAD=ON -DMEDIAFOUNDATION=ON -DSTATIC_DEPS=ON
cc: cl
cxx: cl
cmake_generator: Ninja
# TODO: Fix these broken tests on Windows
ctest_args: --exclude-regex '^AutoDJProcessorTest.(FullIntroOutro_LongerOutro|EnabledSuccess_DecksStopped|FadeToDeck1_LoadOnDeck2_TrackLoadFailed|FadeToDeck2_LoadOnDeck1_TrackLoadSuccess)$'
cpack_generator: WIX
buildenv_basepath: C:\buildenv
buildenv_script: tools/windows_buildenv.bat
artifacts_name: Windows Installer
artifacts_path: cmake_build/*.msi
qt_qpa_platform: windows
env:
# macOS codesigning
APPLE_CODESIGN_IDENTITY: 2C2B5D3EDCE82BA55E22E9A67F16F8D03E390870
MACOS_CODESIGN_OPENSSL_PASSWORD: ${{ secrets.MACOS_CODESIGN_OPENSSL_PASSWORD }}
MACOS_CODESIGN_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_PASSWORD }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- name: "Check out repository"
uses: actions/checkout@v2
- name: "Set up cmake"
uses: jwlawson/actions-setup-cmake@v1.4
with:
# This should always match the mininum required version in
# our CMakeLists.txt
cmake-version: '3.13.x'
- name: "[Windows] Install additional build tools"
if: runner.os == 'Windows'
run: |
python -m pip install ninja git+https://github.com/frerich/clcache.git
- name: "[macOS/Windows] Get build environment name"
if: runner.os != 'Linux'
id: buildenv_name
run: ${{ matrix.buildenv_script }} name
- name: "[macOS/Windows] Set up build environment cache"
if: runner.os != 'Linux'
uses: actions/cache@v2
with:
path: ${{ matrix.buildenv_basepath }}
key: ${{ runner.os }}-buildenv-${{ env.BUILDENV_NAME }}
- name: "[macOS] Import Apple code signing identity"
id: apple_codesign
if: runner.os == 'macOS' && env.MACOS_CODESIGN_OPENSSL_PASSWORD != null && env.MACOS_CODESIGN_CERTIFICATE_PASSWORD != null
run: |
# Decrypt the certificate
openssl enc -aes-256-cbc -d -md sha512 \
-k "${MACOS_CODESIGN_OPENSSL_PASSWORD}" \
-in /Users/runner/work/mixxx/mixxx/cmake/macos_developer_id_codesign_certificate.p12.enc \
-out ~/certificate.p12
# Create a temporary keychain for the certificate and import it.
security create-keychain -p mixxx Mixxx.keychain
security unlock-keychain -p mixxx Mixxx.keychain
security import ~/certificate.p12 -k Mixxx.keychain \
-P "${MACOS_CODESIGN_CERTIFICATE_PASSWORD}" -A
security set-key-partition-list -S "apple-tool:,apple:" -k mixxx Mixxx.keychain
# Add keychain to search list
security list-keychains -s Mixxx.keychain
CMAKE_ARGS="-DAPPLE_CODESIGN_IDENTITY=${APPLE_CODESIGN_IDENTITY}"
echo "::set-output name=cmake_args::${CMAKE_ARGS}"
- name: "Set up build environment"
id: buildenv
run: ${{ matrix.buildenv_script }} setup
env:
BUILDENV_BASEPATH: ${{ matrix.buildenv_basepath }}
- name: "Set ccache size limit"
if: runner.os != 'Windows'
run: ccache -M 5G
- name: "Set up ccache cache"
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ matrix.ccache_path }}
key: ${{ matrix.os }}-ccache-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
${{ matrix.os }}-ccache-${{ github.head_ref }}
${{ matrix.os }}-ccache
- name: "Create build directory"
run: mkdir cmake_build
- name: "[Windows] Set up MSVC Developer Command Prompt"
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.16
- name: "Configure"
run: >
cmake
-G "${{ matrix.cmake_generator }}"
-DCMAKE_BUILD_TYPE=Release
-DBATTERY=ON -DBROADCAST=ON
-DBULK=ON
-DDEBUG_ASSERTIONS_FATAL=ON
-DHID=ON
-DLILV=ON
-DOPUS=ON
-DQTKEYCHAIN=ON
-DVINYLCONTROL=ON
${{ env.CMAKE_FLAGS_EXTRA }}
..
working-directory: cmake_build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CMAKE_FLAGS_EXTRA: ${{ matrix.cmake_args }} ${{ steps.apple_codesign.outputs.cmake_args }} "-DCMAKE_PREFIX_PATH=${{ env.CMAKE_PREFIX_PATH }}" "-DQt5_DIR=${{ env.QT_PATH }}"
- name: "[Ubuntu/macOS] Set up gcc/clang problem matcher"
if: runner.os != 'Windows'
uses: ammaraskar/gcc-problem-matcher@master
- name: "[Windows] Set up MSVC problem matcher"
if: runner.os == 'Windows'
uses: ammaraskar/msvc-problem-matcher@master
- name: "Build"
run: cmake --build .
working-directory: cmake_build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CMAKE_BUILD_PARALLEL_LEVEL: 2
# GitHub Actions automatically zstd compresses caches
CCACHE_NOCOMPRESS: true
- name: "Print ccache stats"
if: runner.os != 'Windows'
run: ccache -s
- name: "Test"
run: ctest --timeout 45 ${{ matrix.ctest_args }}
working-directory: cmake_build
env:
# Render analyzer waveform tests to an offscreen buffer
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}
GTEST_COLOR: 1
CTEST_PARALLEL_LEVEL: 2
CTEST_OUTPUT_ON_FAILURE: 1
- name: Benchmark
run: cmake --build . --target mixxx-benchmark
working-directory: cmake_build
env:
# Render analyzer waveform tests to an offscreen buffer
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}
- name: "Package"
run: cpack -G ${{ matrix.cpack_generator }}
working-directory: cmake_build
- name: "[macOS] Sign Package"
if: runner.os == 'macOS' && env.MACOS_CODESIGN_OPENSSL_PASSWORD != null && env.MACOS_CODESIGN_CERTIFICATE_PASSWORD != null
run: codesign --verbose=4 --options runtime --sign "${APPLE_CODESIGN_IDENTITY}" --entitlements ../build/osx/entitlements.plist *.dmg
working-directory: cmake_build
- name: "[macOS] Upload build to downloads.mixxx.org"
# skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA
if: runner.os == 'macOS' && env.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD != null
run: tools/deploy.sh
env:
FILE_TO_DEPLOY: ${{ matrix.artifacts_path }}
OS: ${{ runner.os }}
DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
SSH_KEY: build/certificates/downloads-hostgator.mixxx.org.key
- name: "Upload GitHub Actions artifacts"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ${{ matrix.artifacts_path }}
|