-
-
Notifications
You must be signed in to change notification settings - Fork 191
1637 lines (1486 loc) · 64.9 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
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Build
on: [push, pull_request]
jobs:
build-opensuse:
name: Build openSUSE
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensuse_version: [ 'tumbleweed', 'leap:15.4', 'leap:15.5' ]
qt_version: [ 'qt5', 'qt6' ]
container:
image: opensuse/${{matrix.opensuse_version}}
steps:
- name: Add tagparser repo
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n ar -c -f -n 'repo-tagparser' https://download.opensuse.org/repositories/home:/mkittler/openSUSE_Tumbleweed/ repo-tagparser
- name: Refresh repositories
run: zypper -n --gpg-auto-import-keys ref
- name: Upgrade packages
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n --gpg-auto-import-keys dup
- name: Install gcc
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n --gpg-auto-import-keys in gcc gcc-c++
- name: Install gcc10
if: matrix.opensuse_version != 'tumbleweed'
run: zypper -n --gpg-auto-import-keys in gcc10 gcc10-c++
- name: Install packages
run: >
zypper -n --gpg-auto-import-keys in
lsb-release
rpm-build
git
tar
make
cmake
gettext-tools
rsync
glibc-devel
libboost_headers-devel
boost-devel
glib2-devel
glib2-tools
dbus-1-devel
alsa-devel
libnotify-devel
protobuf-devel
sqlite3-devel
libpulse-devel
gstreamer-devel
gstreamer-plugins-base-devel
vlc-devel
taglib-devel
libicu-devel
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
libebur128-devel
desktop-file-utils
update-desktop-files
appstream-glib
hicolor-icon-theme
- name: Install Qt 5
if: matrix.qt_version == 'qt5'
run: >
zypper -n --gpg-auto-import-keys in
libQt5Core-devel
libQt5Gui-devel
libQt5Widgets-devel
libQt5Concurrent-devel
libQt5Network-devel
libQt5Sql-devel
libQt5DBus-devel
libQt5Test-devel
libqt5-qtbase-common-devel
libQt5Sql5-sqlite
libqt5-linguist-devel
libqt5-qtx11extras-devel
- name: Install Qt 6
if: matrix.qt_version == 'qt6'
run: >
zypper -n --gpg-auto-import-keys in
qt6-core-devel
qt6-gui-devel
qt6-widgets-devel
qt6-concurrent-devel
qt6-network-devel
qt6-sql-devel
qt6-dbus-devel
qt6-test-devel
qt6-base-common-devel
qt6-sql-sqlite
qt6-linguist-devel
- name: Install tagparser
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n --gpg-auto-import-keys in tagparser-devel
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON -DUSE_TAGLIB=ON
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz /usr/src/packages/SOURCES/
- name: Build RPM (Tumbleweed)
if: matrix.opensuse_version == 'tumbleweed'
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Build RPM (Leap)
if: matrix.opensuse_version != 'tumbleweed'
working-directory: build
env:
CC: gcc-10
CXX: g++-10
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Set opensuse subdir
run: echo "opensuse_subdir=$(echo ${{matrix.opensuse_version}} | sed 's/leap:/lp/g' | sed 's/\.//g')" > $GITHUB_ENV
- name: Upload artifacts
if: matrix.opensuse_version != 'tumbleweed'
uses: actions/upload-artifact@v3
with:
name: opensuse-${{env.opensuse_subdir}}
path: |
/usr/src/packages/SOURCES/*.xz
/usr/src/packages/SRPMS/*.rpm
/usr/src/packages/RPMS/x86_64/*.rpm
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/source ${{secrets.BUILDS_PATH}}/opensuse/${{env.opensuse_subdir}}
- name: rsync source
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci') && matrix.opensuse_version == 'tumbleweed' && matrix.qt_version == 'qt6'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /usr/src/packages/SOURCES/*.xz ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/source/
- name: rsync rpms
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci') && matrix.opensuse_version != 'tumbleweed'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /usr/src/packages/SRPMS/*.rpm /usr/src/packages/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/opensuse/${{env.opensuse_subdir}}/
build-fedora:
name: Build Fedora
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fedora_version: [ '37', '38', '39' ]
container:
image: fedora:${{matrix.fedora_version}}
steps:
- name: Fix /etc/dnf/dnf.conf
if: matrix.fedora_version == '39'
run: |
dnf_conf_main=$(grep '^\[main\]$' /etc/dnf/dnf.conf 2>/dev/null || true)
if [ "${dnf_conf_main}" = "" ]; then
echo "[main]" > /etc/dnf/dnf.conf
echo "gpgcheck=True" >> /etc/dnf/dnf.conf
echo "installonly_limit=3" >> /etc/dnf/dnf.conf
echo "clean_requirements_on_remove=True" >> /etc/dnf/dnf.conf
echo "best=False" >> /etc/dnf/dnf.conf
echo "skip_if_unavailable=True" >> /etc/dnf/dnf.conf
echo "tsflags=nodocs" >> /etc/dnf/dnf.conf
fi
- name: Update repositories
run: dnf update -y
- name: Upgrade packages
run: dnf upgrade -y
- name: Install dependencies
run: >
dnf install -y
@development-tools
redhat-lsb-core
which
git
glibc
gcc-c++
rpmdevtools
make
cmake
pkgconfig
glib
man
tar
gettext
openssh
rsync
boost-devel
dbus-devel
protobuf-devel
protobuf-compiler
sqlite-devel
alsa-lib-devel
pulseaudio-libs-devel
libnotify-devel
libicu-devel
qt6-qtbase-devel
qt6-qtbase-private-devel
qt6-qttools-devel
gstreamer1-devel
gstreamer1-plugins-base-devel
taglib-devel
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
libebur128-devel
fftw-devel
desktop-file-utils
libappstream-glib
hicolor-icon-theme
- name: Remove dangling Qt 6 SQL CMake files
run: rm -rf /usr/lib64/cmake/Qt6Sql/{Qt6QMYSQL*,Qt6QODBCD*,Qt6QPSQL*}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
working-directory: build
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: fedora-${{matrix.fedora_version}}
path: |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/fedora/${{matrix.fedora_version}}
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/fedora/${{matrix.fedora_version}}/
build-openmandriva:
name: Build OpenMandriva
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
openmandriva_version: [ "cooker" ]
container:
image: openmandriva/${{matrix.openmandriva_version}}
steps:
- name: Update repositories
run: dnf update -y
- name: Upgrade packages
run: dnf upgrade -y
- name: Install dependencies
run: >
dnf install -y
glibc
gcc-c++
git
gnutar
make
cmake
glib
gettext
lsb-release
rpmdevtools
rpm-build
rsync
glibc-devel
boost-devel
dbus-devel
protobuf-devel
protobuf-compiler
sqlite-devel
libasound-devel
pulseaudio-devel
lib64GL-devel
libgst-plugins-base1.0-devel
taglib-devel
chromaprint-devel
libebur128-devel
fftw-devel
icu-devel
libcdio-devel
libgpod-devel
libmtp-devel
lib64Qt6Core-devel
lib64Qt6Concurrent-devel
lib64Qt6Network-devel
lib64Qt6Sql-devel
lib64Qt6DBus-devel
lib64Qt6Gui-devel
lib64Qt6Widgets-devel
lib64Qt6Test-devel
qt6-cmake
qt6-qtbase-tools
qt6-qttools
desktop-file-utils
appstream
appstream-util
hicolor-icon-theme
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
working-directory: build
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: openmandriva-${{matrix.openmandriva_version}}
path: |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name: SSH key setup
if: matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/openmandriva/${{matrix.openmandriva_version}}
- name: rsync
if: matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/openmandriva/${{matrix.openmandriva_version}}/
build-mageia:
name: Build Mageia
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mageia_version: [ '8' ]
container:
image: mageia:${{matrix.mageia_version}}
steps:
- name: Update repositories
run: urpmi.update --auto -a
- name: Upgrade packages
run: urpmi --auto --auto-update
- name: Install dependencies
run: >
urpmi --auto --force urpmi-debuginfo-install
git
glibc
gcc-c++
binutils
make
cmake
man
tar
rpmdevtools
gettext
rsync
lib64boost-devel
lib64protobuf-devel
lib64sqlite3-devel
lib64alsa2-devel
lib64pulseaudio-devel
lib64gstreamer1.0-devel
lib64gstreamer-plugins-base1.0-devel
lib64cdio-devel
lib64gpod-devel
lib64mtp-devel
lib64taglib-devel
lib64chromaprint-devel
lib64ebur128-devel
lib64icu-devel
lib64fftw-devel
lib64dbus-devel
lib64appstream-devel
protobuf-compiler
desktop-file-utils
appstream-util
hicolor-icon-theme
- name: Install Qt 5
if: matrix.mageia_version == '8'
run: urpmi --auto --force urpmi-debuginfo-install lib64qt5core-devel lib64qt5gui-devel lib64qt5widgets-devel lib64qt5network-devel lib64qt5concurrent-devel lib64qt5sql-devel lib64qt5dbus-devel lib64qt5help-devel lib64qt5test-devel lib64qt5x11extras-devel
- name: Install Qt 6
if: matrix.mageia_version == 'cauldron'
run: urpmi --auto --force urpmi-debuginfo-install lib64qt6core-devel lib64qt6gui-devel lib64qt6widgets-devel lib64qt6network-devel lib64qt6concurrent-devel lib64qt6sql-devel lib64qt6dbus-devel lib64qt6help-devel lib64qt6test-devel
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
working-directory: build
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: mageia-${{matrix.mageia_version}}
path:
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/mageia/${{matrix.mageia_version}}
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/mageia/${{matrix.mageia_version}}/
build-debian:
name: Build Debian
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
debian_version: [ 'bullseye', 'bookworm', 'trixie' ]
container:
image: debian:${{matrix.debian_version}}
steps:
- name: Update repositories
run: apt update -y
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt install -y
build-essential
dh-make
ssh
git
make
cmake
gcc
g++
pkg-config
fakeroot
gettext
lsb-release
rsync
dpkg-dev
libglib2.0-dev
libdbus-1-dev
libboost-dev
libprotobuf-dev
protobuf-compiler
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
libchromaprint-dev
libebur128-dev
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
- name: Install Qt 5
if: matrix.debian_version == 'bullseye'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
- name: Install Qt 6
if: matrix.debian_version != 'bullseye'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
- name: Copy deb
run: cp ../*.deb .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: debian-${{matrix.debian_version}}
path: "*.deb"
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/debian/${{matrix.debian_version}}
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var *.deb ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/debian/${{matrix.debian_version}}/
build-ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'focal', 'jammy', 'lunar', 'mantic' ]
container:
image: ubuntu:${{matrix.ubuntu_version}}
steps:
- name: Update repositories
run: apt update -y
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt install -y
build-essential
dh-make
ssh
git
make
cmake
pkg-config
gcc
g++
fakeroot
wget
curl
gettext
lsb-release
rsync
dpkg-dev
libglib2.0-dev
libboost-dev
libdbus-1-dev
libprotobuf-dev
protobuf-compiler
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-good1.0-dev
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
libchromaprint-dev
libebur128-dev
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
- name: Install Qt 5
if: matrix.ubuntu_version == 'focal'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
- name: Install Qt 6
if: matrix.ubuntu_version != 'focal'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
- name: Copy deb
run: cp ../*.deb ../*.ddeb .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ubuntu-${{matrix.ubuntu_version}}
path: |
*.deb
*.ddeb
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/ubuntu/${{matrix.ubuntu_version}}
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var *.deb *.ddeb ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/ubuntu/${{matrix.ubuntu_version}}/
upload-ubuntu-ppa:
name: Upload Ubuntu PPA
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'focal', 'jammy', 'lunar', 'mantic' ]
container:
image: ubuntu:${{matrix.ubuntu_version}}
steps:
- name: Update repositories
run: apt update -y
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt install -y
git
ssh
build-essential
dh-make
make
cmake
pkg-config
gcc
g++
fakeroot
gettext
lsb-release
gpg
dput
dpkg-dev
libglib2.0-dev
libboost-dev
libdbus-1-dev
libprotobuf-dev
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-good1.0-dev
libchromaprint-dev
libebur128-dev
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
protobuf-compiler
- name: Install Qt 5
if: matrix.ubuntu_version == 'focal'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
- name: Install Qt 6
if: matrix.ubuntu_version != 'focal'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: Delete build directory
run: rm -rf build
- name: Import Ubuntu PPA GPG private key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{secrets.UBUNTU_PPA_GPG_PRIVATE_KEY}}
- name: dpkg-buildpackage
run: dpkg-buildpackage -S -d -k573D197B5EA20EDF
- name: Upload Unstable PPA
run: dput ppa:jonaski/strawberry-unstable ../*_source.changes
- name: Set is release
run: echo "is_release=$(grep '^\s*set\s*(\s*INCLUDE_GIT_REVISION\s\+OFF\s*)\s*$' cmake/Version.cmake >/dev/null 2>&1 && echo 1 || echo 0)" >> $GITHUB_ENV
- name: Get release version
run: echo "release_version=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)" >> $GITHUB_ENV
- name: Upload Stable PPA
if: env.is_release == '1' && env.release_version != ''
run: dput ppa:jonaski/strawberry ../*_source.changes
build-macos-homebrew:
name: Build macOS Homebrew
runs-on: macos-11
steps:
- name: Remove packages
run: brew remove aliyun-cli ant aws-sam-cli azure-cli bazelisk bicep composer geckodriver ghostscript helm httpd imagemagick kotlin maven [email protected] mongodb-database-tools mongosh nginx php postgresql@14 [email protected] rustup-init sbt selenium-server swiftformat switchaudio-osx firefox google-chrome julia microsoft-edge r session-manager-plugin
- name: Update packages
run: brew update
- name: Upgrade packages
run: brew upgrade || true
- name: Install packages
run: |
brew install pkg-config cmake ninja meson bison flex wget create-dmg gettext boost protobuf protobuf-c rsync
brew install glib glib-openssl glib-utils glib-networking gdk-pixbuf gobject-introspection orc
brew install libffi openssl sqlite fftw libmtp libplist libxml2 libsoup
brew install libogg libvorbis flac wavpack opus speex mpg123 lame twolame taglib chromaprint libebur128 libbs2b libcdio libopenmpt faad2 faac fdk-aac musepack game-music-emu
brew install qt6
- name: Use modified gstreamer plugin formulas
run: |
wget https://files.strawberrymusicplayer.org/patches/gstreamer.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-base.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-good.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-bad.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-ugly.rb
wget https://files.strawberrymusicplayer.org/patches/gst-libav.rb
mv gstreamer.rb gst-plugins-{base,good,bad,ugly}.rb gst-libav.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
- name: Build and install gstreamer
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gstreamer
- name: Build and install gst-plugins-base
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-base
- name: Build and install gst-plugins-good
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-good
- name: Build and install gst-plugins-bad
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-bad
- name: Build and install gst-plugins-ugly
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-plugins-ugly
- name: Build and install gst-libav
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
run: brew reinstall --build-from-source gst-libav
- name: Build libgpod
env:
PERL_MM_USE_DEFAULT: 1
run: |
git clone https://github.com/strawberrymusicplayer/strawberry-libgpod
cd strawberry-libgpod
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 4
sudo make install
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
GIO_EXTRA_MODULES: /usr/local/lib/gio/modules
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c -DENABLE_DBUS=OFF -DPROTOBUF_INCLUDE_DIRS=/usr/local/include
- name: Build
run: cmake --build build --config Release --parallel 4
- name: Install
working-directory: build
run: make install
- name: Remove problematic files
run: |
sudo rm -rf /usr/local/opt/qt6/share/qt/plugins/virtualkeyboard /usr/local/opt/qt6/share/qt/plugins/platforminputcontexts
sudo rm -f /usr/local/Cellar/qt/*/share/qt/plugins/imageformats/libqpdf.dylib
- name: Manually copy files not handled by macdeployqt
working-directory: build
run: |
mkdir -p strawberry.app/Contents/Frameworks/
cp /usr/local/lib/libsoup-3.0.0.dylib strawberry.app/Contents/Frameworks/
- name: Deploy
working-directory: build
run: make deploy
- name: Deploy check
working-directory: build
run: make deploycheck
- name: Create DMG
working-directory: build
run: make dmg
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: build/*.dmg
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/macos
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/macos/
build-macos-macports:
name: Build macOS Macports
runs-on: macos-11
steps:
- name: Install macports
run: |
macports_version=$(wget -q -O- 'https://github.com/macports/macports-base' | sed -n 's,.*releases/tag/\([^"&;]*\)".*,\1,p' | sed 's/^v//g' | sort -V | tail -1)
wget https://github.com/macports/macports-base/releases/download/v${macports_version}/MacPorts-${macports_version}-11-BigSur.pkg
sudo installer -pkg ./MacPorts-${macports_version}-11-BigSur.pkg -target /
- name: Uninstall homebrew
run: |
curl -sLO https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh
chmod +x ./uninstall.sh
sudo ./uninstall.sh --force
- name: Update macports
run: sudo /opt/local/bin/port -v selfupdate
- name: Install packages
run: sudo /opt/local/bin/port -N -p install wget gettext glib2 pkgconfig cmake boost protobuf-cpp sqlite3 chromaprint libebur128 fftw taglib libcdio libmtp
- name: Install gstreamer
run: sudo /opt/local/bin/port -N -p install gstreamer1 gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad gstreamer1-gst-plugins-ugly gstreamer1-gst-libav
- name: Install gst-plugins-bad
run: sudo /opt/local/bin/port -N -p install gstreamer1-gst-plugins-bad +faac
- name: Install qt6-qtbase
run: sudo /opt/local/bin/port -N -p install qt6-qtbase
- name: Install qt6-qttools
run: sudo /opt/local/bin/port -N -p install qt6-qttools || true
- name: Install qt6-sqlite-plugin
run: sudo /opt/local/bin/port -N -p install qt6-sqlite-plugin
- name: Install libgpod
run: sudo /opt/local/bin/port -N -p install libgpod || true
- name: Add /opt/local/bin to PATH
run: echo "/opt/local/bin" >> $GITHUB_PATH
- name: Install create-dmg
shell: bash
run: |
mkdir -p ~/build
cd ~/build
git clone https://github.com/create-dmg/create-dmg
cd create-dmg
sudo make install
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Build Environment
run: /opt/local/bin/cmake -E make_directory build
- name: Configure CMake
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
PKG_CONFIG_PATH: /opt/local/lib/pkgconfig
GIO_EXTRA_MODULES: /opt/local/lib/gio/modules
GST_PLUGIN_SCANNER: /opt/local/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: /opt/local/lib/gstreamer-1.0
run: /opt/local/libexec/qt6/bin/qt-cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DENABLE_DBUS=OFF
- name: Build
run: /opt/local/bin/cmake --build build --config Release --parallel 4
- name: Install
working-directory: build
run: make install
- name: Fix macdeployqt and macdeploycheck
working-directory: build
run: |
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" 3rdparty/macdeployqt/macdeployqt
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" ext/macdeploycheck/macdeploycheck
- name: Deploy
working-directory: build
run: make deploy
- name: Deploy check
working-directory: build
run: make deploycheck