-
Notifications
You must be signed in to change notification settings - Fork 13
353 lines (345 loc) · 16.2 KB
/
build_all_deps.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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
name: Build Audacity Dependencies
on:
workflow_dispatch:
inputs:
audacity_repo:
description: Audacity Repository
required: true
default: audacity/audacity
audacity_ref:
description: Audacity Branch or Tag
required: true
default: master
build_order:
description: The build order YAML file
required: true
default: build_order.yml
build_config:
description: The build config used
required: true
default: audacity3
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_HOST: ${{ secrets.SENTRY_HOST }}
SENTRY_ORG_SLUG: ${{ secrets.SENTRY_ORG_SLUG }}
SENTRY_PROJECT_SLUG: ${{ secrets.SENTRY_PROJECT_SLUG }}
ARTIFACTORY_SYMBOLS_URL: ${{ secrets.ARTIFACTORY_SYMBOLS_URL }}
ARTIFACTORY_SYMBOLS_KEY: ${{ secrets.ARTIFACTORY_SYMBOLS_KEY }}
ARTIFACTORY_MIRROR_URL: ${{ secrets.ARTIFACTORY_MIRROR_URL }}
ARTIFACTORY_CACHE_URL: ${{ secrets.ARTIFACTORY_CACHE_URL }}
CONAN_RECIPES_REMOTE: ${{ secrets.CONAN_RECIPES_REMOTE }}
CONAN_BINARIES_REMOTE: ${{ secrets.CONAN_BINARIES_REMOTE }}
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
jobs:
build_linux:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
# GCC 9
- name: Ubuntu 20.04 x86_64 GCC 9
os: ubuntu-20.04
gcc: 9
release_args: --enable-debug-processor sentry --skip-debug-data-upload
metadata: |
upload_build_tools: true
platform: linux
# GCC 10
- name: Ubuntu 20.04 x86_64 GCC 10
os: ubuntu-20.04
gcc: 10
release_args: --enable-debug-processor sentry --skip-debug-data-upload
metadata: |
platform: linux
# GCC 11
- name: Ubuntu 20.04 x86_64 GCC 11
os: ubuntu-20.04
gcc: 11
release_args:
metadata: "platform: linux"
# GCC 12
- name: Ubuntu 22.04 x86_64 GCC 12
os: ubuntu-22.04
build_type: rel
gcc: 12
release_args:
metadata: "platform: linux"
# GCC 13
- name: Ubuntu 22.04 x86_64 GCC 13
os: ubuntu-22.04
build_type: rel
gcc: 13
release_args:
metadata: "platform: linux"
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout Audacity
uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.audacity_repo }}
ref: ${{ github.event.inputs.audacity_ref }}
path: audacity
- name: Setup Dependencies
shell: bash
run: |
sudo add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test
sudo apt update --yes
apt_packages=(
# For self hosted runners
build-essential cmake
# For Audacity
libasound2-dev libgtk2.0-dev libjack-jackd2-dev gettext python3-pip libgl1-mesa-dev uuid-dev oss4-dev
# For Qt building
libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev
libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev
libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev
libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev
libxv-dev libxvmc-dev libxxf86vm-dev libxcb-render0-dev libxcb-render-util0-dev
libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev
libxcb-randr0-dev libxcb-shape0-dev
libxcb-sync-dev libxcb-xfixes0-dev
libxcb-xinerama0-dev libxcb-dri3-dev
libxcb-util0-dev libxcb-cursor-dev
# xkeyboard-config
xkb-data
# It appears that CCI M4 package does not work correctly
m4
)
sudo apt-get update
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
sudo apt-get remove -y ccache
sudo apt install --yes gcc-${{ matrix.config.gcc }} g++-${{ matrix.config.gcc }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.config.gcc }} 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.config.gcc }} 100
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.config.gcc }} 100
sudo update-alternatives --set gcc /usr/bin/gcc-${{ matrix.config.gcc }}
sudo update-alternatives --set g++ /usr/bin/g++-${{ matrix.config.gcc }}
sudo update-alternatives --set gcov /usr/bin/gcov-${{ matrix.config.gcc }}
gcc --version
g++ --version
gcov --version
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Setup Environment
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE}
- name: Validate Audacity Recipe
shell: bash
run: |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }}
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/linux/gcc${{ matrix.config.gcc }}_x86_64_rel --profile-build build/linux/gcc${{ matrix.config.gcc }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }}
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/linux/gcc${{ matrix.config.gcc }}_x86_64_deb --profile-build build/linux/gcc${{ matrix.config.gcc }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py
- name: Upload to Cache
shell: bash
run: |
echo "${{ matrix.config.metadata }}" > metadata.yml
ls -la
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id gcc${{ matrix.config.gcc }} --metadata-file metadata.yml
build_windows:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: MSVC 2019 x86_64
os: windows-2019
compiler: msvc2019
release_args: --enable-debug-processor symstore --skip-debug-data-upload
debug_args: --enable-debug-processor symstore --skip-debug-data-upload
metadata: "platform: win32"
- name: MSVC 2022 x86_64
os: windows-2022
compiler: msvc2022
release_args: --enable-debug-processor sentry --enable-debug-processor symstore --skip-debug-data-upload
debug_args: --enable-debug-processor symstore --skip-debug-data-upload
metadata: |
upload_build_tools: true
platform: win32
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout Audacity
uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.audacity_repo }}
ref: ${{ github.event.inputs.audacity_ref }}
path: audacity
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Setup Environment
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE}
- name: Validate Audacity Recipe
shell: bash
run: |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }}
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_64_rel --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }}
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_rel --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }}
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_64_deb --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.debug_args }}
python3 utils/conan-utils.py --build-dir "${{ github.workspace }}/../../t" validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/windows/${{ matrix.config.compiler }}_x86_deb --profile-build build/windows/${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.debug_args }}
- name: Upload to Cache
shell: bash
run: |
echo "${{ matrix.config.metadata }}" > metadata.yml
ls -la
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id ${{ matrix.config.compiler }} --metadata-file metadata.yml
build_macos:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: XCode 14.2
os: macos-13
compiler: 14
xcode_version: 14.2
release_args: --enable-debug-processor sentry --skip-debug-data-upload
metadata: "platform: darwin"
- name: XCode 15.0.1
os: macos-13
compiler: 15
xcode_version: 15.0.1
release_args:
metadata: |
upload_build_tools: true
platform: darwin
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout Audacity
uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.audacity_repo }}
ref: ${{ github.event.inputs.audacity_ref }}
path: audacity
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.config.compiler }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Setup Environment
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py add-remote --name conan-utils-audacity-binaries-conan2 --url ${CONAN_BINARIES_REMOTE}
- name: Validate Audacity Recipe
shell: bash
run: |
python3 utils/conan-utils.py export-recipes --build-order ${{ github.event.inputs.build_order }}
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_x86_64_rel --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }}
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_arm64_rel --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py ${{ matrix.config.release_args }}
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_x86_64_deb --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py
python3 utils/conan-utils.py validate-recipe --remote conan-utils-audacity-binaries-conan2 --profile-host host/macos/apple_clang${{ matrix.config.compiler }}_arm64_deb --profile-build build/macos/apple_clang${{ matrix.config.compiler }}_x86_64 --build-order ${{ github.event.inputs.build_order }} --recipe-config ${{ github.event.inputs.build_config }} --recipe audacity/conan/conanfile.py
- name: Upload to Cache
shell: bash
run: |
echo "${{ matrix.config.metadata }}" > metadata.yml
ls -la
python3 utils/conan-utils.py store-cache --group-id ${{ github.run_id }} --cache-id apple_clang${{ matrix.config.compiler }} --metadata-file metadata.yml
update_conan_remotes:
name: Update Conan remotes
runs-on: ubuntu-22.04
needs: [build_linux, build_windows, build_macos]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Update Remotes
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py list-cache --group-id ${{ github.run_id }}
python3 utils/conan-utils.py process-conan-cache --group-id ${{ github.run_id }}
upload_debug_symbols:
name: Upload ${{ matrix.config.name }} debug symbols
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: Linux
os: ubuntu-20.04
- name: Windows
os: windows-2022
- name: MacOS
os: macos-13
needs: [update_conan_remotes]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Update Remotes
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py process-debug-cache --group-id ${{ github.run_id }}
cleanup_remote_cache:
name: Cleanup Remote Cache
runs-on: ubuntu-22.04
needs: [build_linux, build_windows, build_macos, update_conan_remotes, upload_debug_symbols]
if: always() && !cancelled()
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: 'pip'
cache-dependency-path: utils/requirements.txt
- uses: BSFishy/pip-action@v1
with:
requirements: utils/requirements.txt
- name: Update Remotes
shell: bash
run: |
python3 utils/conan-utils.py init-env --clean
python3 utils/conan-utils.py delete-cache --group-id ${{ github.run_id }}