forked from DISTRHO/Cardinal
-
Notifications
You must be signed in to change notification settings - Fork 0
678 lines (665 loc) · 26.8 KB
/
build.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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
name: build
on: [push, pull_request]
env:
CACHE_VERSION: 7
CARDINAL_UNDER_WINE: 1
CIBUILD: true
DEBIAN_FRONTEND: noninteractive
LIBGL_ALWAYS_SOFTWARE: true
PAWPAW_SKIP_GLIB: 1
PAWPAW_SKIP_LTO: 1
PAWPAW_SKIP_LV2: 1
PAWPAW_SKIP_OPENSSL: 1
PAWPAW_SKIP_SAMPLERATE: 1
PAWPAW_SKIP_TESTS: 1
jobs:
linux:
strategy:
matrix:
target: [aarch64, armhf, i686, riscv64, x86_64]
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Install git
run: |
apt-get update -qq && apt-get install -yqq --no-install-recommends ca-certificates curl git openssl
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git_2.34.1-1ubuntu1~bpo20.04.1~ppa1_amd64.deb
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo20.04.1~ppa1_all.deb
dpkg -i *.deb
rm *.deb
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up build cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
src/Rack/dep/bin
src/Rack/dep/include
src/Rack/dep/lib
src/Rack/dep/share
src/Rack/dep/jansson-2.12
src/Rack/dep/libarchive-3.4.3
src/Rack/dep/libsamplerate-0.1.9
src/Rack/dep/zstd-1.4.5
key: linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Setup dependencies
shell: bash
run: |
./deps/PawPaw/.github/workflows/bootstrap-deps.sh linux-${{ matrix.target }}
apt-get install -yqq wget zip
- name: Setup dependencies (aarch64)
if: ${{ matrix.target == 'aarch64' }}
shell: bash
run: |
apt-get install -yqq libsdl2-dev:arm64
apt-get clean
- name: Setup dependencies (armhf)
if: ${{ matrix.target == 'armhf' }}
shell: bash
run: |
apt-get install -yqq libsdl2-dev:armhf
apt-get clean
- name: Setup dependencies (i686)
if: ${{ matrix.target == 'i686' }}
shell: bash
run: |
apt-get install -yqq libsdl2-dev:i386
apt-get clean
- name: Setup dependencies (riscv64)
if: ${{ matrix.target == 'riscv64' }}
shell: bash
run: |
apt-get install -yqq libsdl2-dev:riscv64
apt-get clean
- name: Setup dependencies (x86_64)
if: ${{ matrix.target == 'x86_64' }}
shell: bash
run: |
apt-get install -yqq libsdl2-dev
apt-get clean
- name: Set up ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Build extra dependencies
run: |
./deps/PawPaw/bootstrap-cardinal.sh linux-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh linux-${{ matrix.target }}
- name: Build linux
shell: bash
run: |
export PATH="/usr/lib/ccache:${PATH}"
source deps/PawPaw/local.env linux-${{ matrix.target }}
make features
make HAVE_PULSEAUDIO=false NOOPT=true USING_GLES2=${{ matrix.target == 'aarch64' || matrix.target == 'armhf' }} -j $(nproc)
make unzipfx
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
run: |
tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.tar.gz
linux-x86_64-debug:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf meson
sudo apt-get clean
- name: Build linux x86_64 (debug)
env:
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make features
# multiple jobs for building carla, deps and plugins
make DEBUG=true carla deps dgl plugins resources -j $(nproc)
# single job for final build stage, otherwise we might get killed due to OOM
make DEBUG=true HAVE_PULSEAUDIO=false clap lv2 vst2 vst3 -j 1
- name: Set sha8
id: slug
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack binaries
run: |
tar -c -h --hard-dereference -J -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}.tar.xz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.gz
macos:
strategy:
matrix:
target: [universal-10.15]
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
src/Rack/dep/bin
src/Rack/dep/include
src/Rack/dep/lib
src/Rack/dep/share
src/Rack/dep/jansson-2.12
src/Rack/dep/libarchive-3.4.3
src/Rack/dep/libsamplerate-0.1.9
src/Rack/dep/zstd-1.4.5
key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Setup dependencies
run: |
./deps/PawPaw/.github/workflows/bootstrap-deps.sh macos-${{ matrix.target }}
- name: Build extra dependencies
run: |
export PATH="/usr/local/opt/ccache/libexec:${PATH}"
./deps/PawPaw/bootstrap-cardinal.sh macos-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh macos-${{ matrix.target }}
- name: Set up ccache
if: steps.cache.outputs.cache-hit == 'true'
uses: hendrikmuhs/[email protected]
with:
key: ccache-macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Build macOS (base)
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
export PATH="/usr/local/opt/ccache/libexec:${PATH}"
source deps/PawPaw/local.env macos-${{ matrix.target }}
make features
make NOOPT=true -j $(sysctl -n hw.logicalcpu)
- name: Build macOS (packaging)
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
source deps/PawPaw/local.env macos-${{ matrix.target }}
./utils/create-macos-installer.sh
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Rename macOS bundle
if: steps.cache.outputs.cache-hit == 'true'
run: |
mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.pkg
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
${{ github.event.repository.name }}-*.pkg
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
${{ github.event.repository.name }}-*.pkg
modaudio:
strategy:
matrix:
include:
- name: modduo
target: modduo-static
extraflags: MODDUO=true
- name: modduox
target: modduox-static
- name: moddwarf
target: moddwarf
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v4
id: mpb-cache
with:
path: |
~/mod-workdir
key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
sudo apt-get clean
- name: Bootstrap toolchain
if: steps.mpb-cache.outputs.cache-hit != 'true'
run: |
git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
$(pwd)/deps/mod-plugin-builder/bootstrap.sh ${{ matrix.target }} minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh ${{ matrix.target }}
- name: Build for modaudio
if: steps.mpb-cache.outputs.cache-hit == 'true'
run: |
make HEADLESS=true ${{ matrix.name }}-features
make HEADLESS=true ${{ matrix.extraflags }} ${{ matrix.name }} -j $(nproc)
- name: Set sha8
id: slug
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack binaries
if: steps.mpb-cache.outputs.cache-hit == 'true'
run: |
tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2)
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.gz
wasm:
strategy:
matrix:
target: [simd, nosimd]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
src/Rack/dep/bin
src/Rack/dep/include
src/Rack/dep/lib
src/Rack/dep/share
src/Rack/dep/jansson-2.12
src/Rack/dep/libarchive-3.4.3
src/Rack/dep/libsamplerate-0.1.9
src/Rack/dep/zstd-1.4.5
key: wasm-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq brotli gperf meson
sudo apt-get clean
- name: Build extra dependencies
run: |
${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1
./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm
- name: Build wasm cross-compiled
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1
source deps/PawPaw/local.env wasm
# FIXME send patch upstream, assuming this works..
sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h
make features
make HAVE_LIBLO=false NOOPT=true NOSIMD=${{ matrix.target == 'nosimd' }} -j $(nproc)
- name: Build modgui
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1
source deps/PawPaw/local.env wasm
make HAVE_LIBLO=false NOOPT=true NOSIMD=${{ matrix.target == 'nosimd' }} -j $(nproc) -C src/CardinalMiniSep modgui
- name: Make wasm versioned and compress
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
${{ matrix.target == 'nosimd' }} && export SUFFIX="-nosimd"
VERSION=$(cat Makefile | awk 'sub("VERSION = ","")')
cd bin
sed -i "s/CardinalMini\./CardinalMini-v${VERSION}\./g" *.html *.js
sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js
sed -i "s/CardinalMini-nosimd\./CardinalMini-nosimd-v${VERSION}\./g" *.html *.js
sed -i "s/CardinalNative-nosimd\./CardinalNative-nosimd-v${VERSION}\./g" *.html *.js
mv CardinalMini.data CardinalMini${SUFFIX}-v${VERSION}.data
mv CardinalMini.js CardinalMini${SUFFIX}-v${VERSION}.js
mv CardinalMini.wasm CardinalMini${SUFFIX}-v${VERSION}.wasm
mv CardinalNative.data CardinalNative${SUFFIX}-v${VERSION}.data
mv CardinalNative.js CardinalNative${SUFFIX}-v${VERSION}.js
mv CardinalNative.wasm CardinalNative${SUFFIX}-v${VERSION}.wasm
brotli -k -q 11 *.data *.html *.js *.wasm
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
if: steps.cache.outputs.cache-hit == 'true'
run: |
cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) CardinalMini.lv2/modgui
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.zip
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.zip
windows:
strategy:
matrix:
target: [win32, win64]
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
steps:
- name: Install git
run: |
apt-get update -qq && apt-get install -yqq --no-install-recommends ca-certificates git openssl
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
src/Rack/dep/bin
src/Rack/dep/include
src/Rack/dep/lib
src/Rack/dep/share
src/Rack/dep/jansson-2.12
src/Rack/dep/libarchive-3.4.3
src/Rack/dep/libsamplerate-0.1.9
src/Rack/dep/zstd-1.4.5
key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
./deps/PawPaw/.github/workflows/bootstrap-deps.sh ${{ matrix.target }}
apt-get install -yqq wget xvfb zip
apt-get clean
- name: Set up ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
- name: Build extra dependencies
run: |
./deps/PawPaw/bootstrap-cardinal.sh ${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh ${{ matrix.target }}
- name: Build cross-compiled (base)
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
export PATH="/usr/lib/ccache:${PATH}"
source deps/PawPaw/local.env ${{ matrix.target }}
make features
make NOOPT=true -j $(nproc)
- name: Build cross-compiled (carla)
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
export PATH="/usr/lib/ccache:${PATH}"
source deps/PawPaw/local.env ${{ matrix.target }}
make carla-win32 -j $(nproc)
make -C carla EMBED_TARGET=true TESTING=true dist
make -C carla EMBED_TARGET=true TESTING=true dist
- name: Build cross-compiled (packaging)
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
source deps/PawPaw/local.env ${{ matrix.target }}
xvfb-run ./utils/create-windows-installer.sh ${{ matrix.target }}
make unzipfx
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: |
pushd bin
zip -r -9 ../${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap)
popd
zip -u -9 ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
Cardinal-*.exe
Cardinal-*.zip
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
Cardinal-*.exe
Cardinal-*.zip
headless:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
sudo apt-get install -yqq liblo-dev
sudo apt-get clean
- name: Build linux (headless)
run: |
make HEADLESS=true features
make HEADLESS=true -j $(nproc)
lto:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
sudo apt-get clean
- name: Build linux (LTO)
run: |
make features
make WITH_LTO=true -j $(nproc) native
sysdeps:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev
sudo apt-get clean
- name: Build linux (sysdeps)
run: |
make features
make SYSDEPS=true -j $(nproc)
source-tarball:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq liblo-dev
sudo apt-get clean
- name: Create source tarball
run: |
make HEADLESS=true tarball
make HEADLESS=true tarball+deps
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || env.SHA8 }}
path: |
/home/runner/cardinal*.tar.xz
/home/runner/*/cardinal*.tar.xz
/home/runner/*/*/cardinal*.tar.xz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
/home/runner/cardinal*.tar.xz
/home/runner/*/cardinal*.tar.xz
/home/runner/*/*/cardinal*.tar.xz
plugin-validation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
src/Rack/dep/bin
src/Rack/dep/include
src/Rack/dep/lib
src/Rack/dep/share
src/Rack/dep/jansson-2.12
src/Rack/dep/libarchive-3.4.3
src/Rack/dep/libsamplerate-0.1.9
src/Rack/dep/zstd-1.4.5
key: pluginval-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
# custom repos
wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
sudo dpkg -i kxstudio-repos_11.1.0_all.deb
sudo apt-get update -qq
# build-deps
sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
# runtime testing
sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
sudo apt-get clean
# multiple jobs for building carla, deps and plugins
- name: Build Cardinal (carla, deps and plugins)
env:
CFLAGS: -g
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make features
make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc)
# single job for final build stage, otherwise we might get killed due to OOM
- name: Build Cardinal (final build stage)
env:
CFLAGS: -g
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make features
make NOOPT=true SKIP_STRIPPING=true -j 1 -C src jack
make NOOPT=true -j 1
./dpf/utils/generate-ttl.sh
- name: Run Cardinal self-tests
run: |
# --exit-on-first-error=yes
xvfb-run valgrind \
--gen-suppressions=all \
--error-exitcode=255 \
--leak-check=no \
--track-origins=yes \
--keep-debuginfo=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
./bin/Cardinal selftest
- name: Validate LV2 ttl syntax
run: |
lv2_validate \
/usr/lib/lv2/kx-meta/*.ttl \
/usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
/usr/lib/lv2/kx-programs.lv2/*.ttl \
/usr/lib/lv2/mod.lv2/*.ttl \
/usr/lib/lv2/modgui.lv2/*.ttl \
./bin/*.lv2/*.ttl
- name: Validate LV2 metadata and binaries
run: |
export LV2_PATH=/tmp/lv2-path
mkdir ${LV2_PATH}
mv bin/CardinalFX.lv2 bin/CardinalSynth.lv2 ${LV2_PATH}
cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,modgui,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 ${LV2_PATH}
xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
- name: Test LV2 plugin
run: |
export LV2_PATH=/tmp/lv2-path
for p in $(lv2ls); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
--error-exitcode=255 \
--leak-check=no \
--track-origins=yes \
--keep-debuginfo=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native lv2 "" ${p}; \
done
- name: Test VST2 plugin
run: |
for p in $(ls bin/*.vst/*.so); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
--error-exitcode=255 \
--leak-check=no \
--track-origins=yes \
--keep-debuginfo=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst2 ./${p} ""; \
done
- name: Test VST3 plugin
run: |
for p in $(ls bin/ | grep vst3); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
--error-exitcode=255 \
--leak-check=no \
--track-origins=yes \
--keep-debuginfo=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst3 ./bin/${p} ""; \
done