-
-
Notifications
You must be signed in to change notification settings - Fork 360
599 lines (535 loc) · 22 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
name: QLCplus Github Actions CI Build
on: ["push", "pull_request"]
jobs:
build-linux:
#if: false
runs-on: ubuntu-20.04
name: QLCplus Linux ${{matrix.task}}
strategy:
#fail-fast: false
matrix:
task: [compile-qt5, compile-qt5qml, coverage-qt5]
env:
CI_REPO_SLUG: ${{ github.repository }}
CI_BRANCH: ${{ github.head_ref }}
CI_PULL_REQUEST: ${{ github.event.number }}
CC: gcc
CXX: g++
PACKAGES_BASE:
gdb
libasound2-dev
libusb-1.0-0-dev
libftdi1-dev
shared-mime-info
libudev-dev
libmad0-dev
libsndfile1-dev
liblo-dev
libfftw3-dev
libgl1-mesa-dev
libxml2-utils
xvfb
ccache
wget
PACKAGES_QML_BASE:
libpulse-dev
PACKAGES_COVERAGE_BASE:
lcov
QT_MODULES:
qtscript
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set General ENV variables
run: |
echo "PACKAGES_QT5=$(echo ${PACKAGES_BASE})" >> $GITHUB_ENV
echo "PACKAGES_QML=$(echo ${PACKAGES_BASE} ${PACKAGES_QML_BASE})" >> $GITHUB_ENV
echo "PACKAGES_COVERAGE=$(echo ${PACKAGES_BASE} ${PACKAGES_QT5_BASE} ${PACKAGES_COVERAGE_BASE})" >> $GITHUB_ENV
echo "PACKAGES_ALL=$(echo ${PACKAGES_BASE} ${PACKAGES_QML_BASE} ${PACKAGES_COVERAGE_BASE})" >> $GITHUB_ENV
echo "CI_BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 3)" >> $GITHUB_ENV
echo "CI_SECURE_ENV_VARS=$(if [ -z '${{ secrets.something }}' ]; then echo 'false'; else echo 'true'; fi)" >> $GITHUB_ENV
echo "CI_EVENT_TYPE=$(if [ 'schedule' == '${{ github.event_name }}' ]; then echo 'cron'; else echo '${{ github.event_name }}'; fi)" >> $GITHUB_ENV
echo "NPROC=$(nproc)" >> $GITHUB_ENV
echo "TASK=$(echo '${{matrix.task}}' | cut -d '-' -f 2)" >> $GITHUB_ENV
echo "INSTALL_ROOT=`pwd`/install_root" >> $GITHUB_ENV
echo "BUILD_DATE=`date -u '+%Y%m%d'`" >> $GITHUB_ENV
echo "GIT_REV=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Set QT ENV variables (qt5)
if: ${{ endsWith( matrix.task, 'qt5') }}
run: |
echo "QT=${QT:-$(echo '${{matrix.task}}' | cut -d '-' -f 2)}" >> $GITHUB_ENV
echo "QT_INSTALL_DIR=/opt" >> $GITHUB_ENV
echo "QT_VERSION=5.14.2" >> $GITHUB_ENV
echo "QT_MODULES_INSTALL=$(echo ${QT_MODULES})" >> $GITHUB_ENV
echo "APPVERSION=`grep '^!qmlui' variables.pri | grep APPVERSION | sed 's/^.*= *//;s/ /_/g'`" >> $GITHUB_ENV
source $GITHUB_ENV && echo "QTDIR=${QT_INSTALL_DIR}/Qt/${QT_VERSION}/gcc_64" >> $GITHUB_ENV
source $GITHUB_ENV && echo "QMAKE=${QTDIR}/bin/qmake" >> $GITHUB_ENV
- name: Set QT ENV variables (qt5qml)
if: ${{ endsWith( matrix.task, 'qt5qml') }}
run: |
echo "QT=${QT:-$(echo '${{matrix.task}}' | cut -d '-' -f 2)}" >> $GITHUB_ENV
echo "QT_INSTALL_DIR=/opt" >> $GITHUB_ENV
echo "QT_VERSION=5.14.2" >> $GITHUB_ENV
echo "QT_MODULES_INSTALL=$(echo ${QT_MODULES})" >> $GITHUB_ENV
echo "APPVERSION=`grep '^qmlui' variables.pri | grep APPVERSION | sed 's/^.*= *//;s/ /_/g'`" >> $GITHUB_ENV
source $GITHUB_ENV && echo "QTDIR=${QT_INSTALL_DIR}/Qt/${QT_VERSION}/gcc_64" >> $GITHUB_ENV
source $GITHUB_ENV && echo "QMAKE=${QTDIR}/bin/qmake" >> $GITHUB_ENV
- name: Print ENV vars
run: |
echo "CI_BRANCH: ${CI_BRANCH}"
echo "CI_PULL_REQUEST: ${CI_PULL_REQUEST}"
echo "CI_REPO_SLUG: ${CI_REPO_SLUG}"
echo "CI_EVENT_TYPE: ${CI_EVENT_TYPE}"
echo "CI_SECURE_ENV_VARS: ${CI_SECURE_ENV_VARS}"
echo "PACKAGES_QT5: ${PACKAGES_QT5}"
echo "PACKAGES_QML: ${PACKAGES_QML}"
echo "PACKAGES_COVERAGE: ${PACKAGES_COVERAGE}"
echo "TASK: ${TASK}"
echo "QT: ${QT}"
echo "NPROC: ${NPROC}"
- name: Download, cache and install packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ${{env.PACKAGES_ALL}}
version: ${{runner.os}}-apt
- name: Install Qt through aqt (and python)
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
cache: true
dir: ${{ env.QT_INSTALL_DIR }}
modules: ${{ env.QT_MODULES_INSTALL }}
- name: Install python-lxml for fixtures-tool # with the now-registered aqt python
run: pip install lxml
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
install_ccache: false
ccache_options: |
max_size=5G
compression=false
- name: Setup ruby cache
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Install coveralls-lcov
if: ${{ startsWith( matrix.task, 'coverage') }}
run: sudo gem install coveralls-lcov
- name: Print program versions and username
run: |
echo "CXX:"
${CXX} --version
echo "QMAKE:"
${QMAKE} -v
echo "Python:"
python --version
echo "WHOAMI:"
whoami
- name: Configure for QT5 build
if: ${{ matrix.task == 'compile-qt5' }}
run: |
${QMAKE} QMAKE_CXX="${CXX}" QMAKE_CC="${CC}" QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" CONFIG+=appimage FORCECONFIG=release
- name: Configure for QT5QML build
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
$QMAKE QMAKE_CXX="$CXX" QMAKE_CC="$CC" QMAKE_LINK="$CXX" QMAKE_LINK_SHLIB="$CXX" CONFIG+=appimage CONFIG+=qmlui FORCECONFIG=release
- name: Configure for QT5 coverage build
if: ${{ matrix.task == 'coverage-qt5' }}
run: |
$QMAKE QMAKE_CXX="$CXX" QMAKE_CC="$CC" QMAKE_LINK="$CXX" QMAKE_LINK_SHLIB="$CXX" CONFIG+=coverage
#QMAKE_CXXFLAGS+="-fno-sized-deallocation"
- name: Build
run: make -j $NPROC
- name: Test
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: make check
- name: Test with Coverage
if: ${{ startsWith( matrix.task, 'coverage') }}
run: make lcov
- name: Coveralls
if: ${{ startsWith( matrix.task, 'coverage') }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage/coverage.info
format: lcov
- name: Install
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: |
make INSTALL_ROOT=${INSTALL_ROOT} install
cp -v resources/icons/svg/qlcplus.svg ${INSTALL_ROOT}
cp -v platforms/linux/qlcplus.desktop ${INSTALL_ROOT}
- name: Adapt qlcplus for AppImage (qt5)
if: ${{ matrix.task == 'compile-qt5' }}
run: |
chrpath -r "../lib" ${INSTALL_ROOT}/usr/bin/qlcplus
- name: Adapt qlcplus for AppImage (qt5qml)
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
chrpath -r "../lib" ${INSTALL_ROOT}/usr/bin/qlcplus-qml
sed -i -e 's/Exec=qlcplus --open %f/Exec=qlcplus-qml/g' ${INSTALL_ROOT}/qlcplus.desktop
- name: Store original install artifacts before stripping and AppImage
# Activate for debugging
if: ${{ false && ! startsWith( matrix.task, 'coverage') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}-files
path: ${{ env.INSTALL_ROOT }}
- name: Strip Binaries (qt5)
if: ${{ matrix.task == 'compile-qt5' }}
run: |
strip -v ${INSTALL_ROOT}/usr/bin/qlcplus
find ${INSTALL_ROOT}/usr/lib/ -name libqlcplusengine.so.1.0.0 -exec strip -v {} \;
- name: Strip Binaries (qt5qml)
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
strip -v ${INSTALL_ROOT}/usr/bin/qlcplus-qml
find ${INSTALL_ROOT}/usr/lib/ -name libqlcplusengine.so.1.0.0 -exec strip -v {} \;
- name: Delete unused files for AppImage
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: |
find ${INSTALL_ROOT}/usr/bin/ -name plugins.qmltypes -type f -delete
find ${INSTALL_ROOT}/usr/bin -name *.qmlc -type f -delete
rm -rf ${INSTALL_ROOT}/usr/bin/QtQuick/Extras QtQuick/Particles.2 QtQuick/XmlListModel
rm -rf ${INSTALL_ROOT}/usr/bin/QtQuick/Controls.2/designer QtQuick/Controls.2/Material
rm -rf ${INSTALL_ROOT}/usr/bin/QtQuick/Controls.2/Universal QtQuick/Controls.2/Fusion
rm -rf ${INSTALL_ROOT}/usr/bin/QtQuick/Controls.2/Imagine QtQuick/Controls.2/Scene2D
- name: Build AppImage
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: |
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 -O ${INSTALL_ROOT}/AppRun
chmod a+x ${INSTALL_ROOT}/AppRun
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage
chmod a+x ./appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage -v ${INSTALL_ROOT}
mv -v Q_Light_Controller_Plus-x86_64.AppImage qlcplus-${{env.TASK}}-${{env.APPVERSION}}-${{env.BUILD_DATE}}-${{env.GIT_REV}}.AppImage
- name: Test Load AppImage
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
./qlcplus-${{env.TASK}}-${{env.APPVERSION}}-${{env.BUILD_DATE}}-${{env.GIT_REV}}.AppImage --platform offscreen --version
- name: Store AppImage artifacts
if: ${{ ! startsWith( matrix.task, 'coverage') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}-AppImage
path: qlcplus-${{env.TASK}}-${{env.APPVERSION}}-${{env.BUILD_DATE}}-${{env.GIT_REV}}.AppImage
build-windows:
runs-on: windows-latest
name: QLCplus Windows ${{matrix.task}}
strategy:
fail-fast: false
matrix:
task: [compile-qt5, compile-qt5-32bit, compile-qt5qml]
env:
CI_REPO_SLUG: ${{ github.repository }}
CI_BRANCH: ${{ github.head_ref }}
CI_PULL_REQUEST: ${{ github.event.number }}
QMAKESPEC: win32-g++
QT_MODULES:
qtscript
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set ENV variables
shell: bash
run: |
echo "CI_BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 3)" >> $GITHUB_ENV
echo "CI_SECURE_ENV_VARS=$(if [ -z '${{ secrets.something }}' ]; then echo 'false'; else echo 'true'; fi)" >> $GITHUB_ENV
echo "CI_EVENT_TYPE=$(if [ 'schedule' == '${{ github.event_name }}' ]; then echo 'cron'; else echo '${{ github.event_name }}'; fi)" >> $GITHUB_ENV
echo "NPROC=$(nproc)" >> $GITHUB_ENV
echo "TASK=$(echo '${{matrix.task}}' | cut -d '-' -f 2)" >> $GITHUB_ENV
echo "QT=${QT:-$(echo '${{matrix.task}}' | cut -d '-' -f 2)}" >> $GITHUB_ENV
echo "INSTALL_ROOT=/c/" >> $GITHUB_ENV
echo "BUILD_DATE=`date -u '+%Y%m%d'`" >> $GITHUB_ENV
echo "GIT_REV=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Set v4 ENV variables
shell: bash
if: ${{ matrix.task == 'compile-qt5' || matrix.task == 'compile-qt5-32bit' }}
run: |
echo "OUTFILE=`grep 'OutFile' platforms/windows/qlcplus4Qt5.nsi | cut -d'"' -f 2`" >> $GITHUB_ENV
echo "APPVERSION=`grep '^!qmlui' variables.pri | grep APPVERSION | sed 's/^.*= *//' | cut -d ' ' -f 1`" >> $GITHUB_ENV
echo "NSIS_SCRIPT=qlcplus4Qt5.nsi" >> $GITHUB_ENV
- name: Set v5 ENV variables
shell: bash
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
echo "OUTFILE=`grep 'OutFile' platforms/windows/qlcplus5Qt5.nsi | cut -d'"' -f 2`" >> $GITHUB_ENV
echo "APPVERSION=`grep '^qmlui' variables.pri | grep APPVERSION | sed 's/^.*= *//' | cut -d ' ' -f 1`" >> $GITHUB_ENV
echo "NSIS_SCRIPT=qlcplus5Qt5.nsi" >> $GITHUB_ENV
- name: Print ENV vars
shell: bash
run: |
echo "CI_BRANCH: ${CI_BRANCH}"
echo "CI_PULL_REQUEST: ${CI_PULL_REQUEST}"
echo "CI_REPO_SLUG: ${CI_REPO_SLUG}"
echo "CI_EVENT_TYPE: ${CI_EVENT_TYPE}"
echo "CI_SECURE_ENV_VARS: ${CI_SECURE_ENV_VARS}"
echo "TASK: ${TASK}"
echo "QT: ${QT}"
echo "NPROC: ${NPROC}"
- name: Update and install MSYS2 (64bit)
uses: msys2/setup-msys2@v2
if: ${{ matrix.task == 'compile-qt5' || matrix.task == 'compile-qt5qml' }}
with:
msystem: mingw64
release: true
update: false
path-type: inherit
install: >-
wget
unzip
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-libs
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libmad
mingw-w64-x86_64-libsndfile
mingw-w64-x86_64-flac
mingw-w64-x86_64-fftw
mingw-w64-x86_64-libusb
mingw-w64-x86_64-python-lxml
mingw-w64-x86_64-qt5-base
mingw-w64-x86_64-qt5-multimedia
mingw-w64-x86_64-qt5-serialport
mingw-w64-x86_64-qt5-websockets
mingw-w64-x86_64-qt5-script
mingw-w64-x86_64-qt5-tools
mingw-w64-x86_64-qt5-imageformats
mingw-w64-x86_64-qt5-svg
mingw-w64-x86_64-qt5-declarative
mingw-w64-x86_64-qt5-quickcontrols
mingw-w64-x86_64-qt5-quickcontrols2
mingw-w64-x86_64-qt5-3d
mingw-w64-x86_64-qt5-quick3d
mingw-w64-x86_64-nsis
- name: Update and install MSYS2 (32 bit)
uses: msys2/setup-msys2@v2
if: ${{ matrix.task == 'compile-qt5-32bit' }}
with:
msystem: mingw32
release: true
update: false
path-type: inherit
install: >-
wget
unzip
mingw-w64-i686-gcc
mingw-w64-i686-gcc-libs
mingw-w64-i686-cmake
mingw-w64-i686-libmad
mingw-w64-i686-libsndfile
mingw-w64-i686-flac
mingw-w64-i686-fftw
mingw-w64-i686-python-lxml
mingw-w64-i686-qt5-base
mingw-w64-i686-qt5-multimedia
mingw-w64-i686-qt5-serialport
mingw-w64-i686-qt5-websockets
mingw-w64-i686-qt5-script
mingw-w64-i686-qt5-tools
mingw-w64-i686-qt5-imageformats
mingw-w64-i686-qt5-svg
mingw-w64-i686-qt5-declarative
mingw-w64-i686-nsis
- name: Install legacy libusb (32 bit)
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5-32bit' }}
run: |
wget https://www.qlcplus.org/misc/mingw-w64-i686-libusb-1.0.26-1-any.pkg.tar.zst
pacman --noconfirm --needed -U mingw-w64-i686-libusb-1.0.26-1-any.pkg.tar.zst
- name: D2XX SDK (64 bit)
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5' || matrix.task == 'compile-qt5qml' }}
run: |
mkdir -p /c/projects/D2XXSDK
wget https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip -O /c/projects/D2XXSDK/cdm.zip
cd /c/projects/D2XXSDK
unzip cdm.zip
cd amd64
gendef.exe - ftd2xx64.dll > ftd2xx.def
dlltool -k --input-def ftd2xx.def --dllname ftd2xx64.dll --output-lib libftd2xx.a
- name: D2XX SDK (32 bit)
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5-32bit' }}
run: |
mkdir -p /c/projects/D2XXSDK
wget https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip -O /c/projects/D2XXSDK/cdm.zip
cd /c/projects/D2XXSDK
unzip cdm.zip
cd i386
gendef.exe - ftd2xx.dll > ftd2xx.def
dlltool -k --input-def ftd2xx.def --dllname ftd2xx.dll --output-lib libftd2xx.a
- name: Print program versions
shell: msys2 {0}
run: |
echo "pwd:"
pwd
echo "CXX:"
which ${CXX} || true
${CXX} -v || true
echo "cmake:"
which cmake || true
cmake --version || true
pkg-config --modversion libusb-1.0
- name: Fix build
shell: msys2 {0}
run: |
# force a release build
sed -i -e 's/Debug/Release/g' CMakeLists.txt
# disable Velleman plugin
sed -i -e 's/ add_subdirectory(velleman)/# add_subdirectory(velleman)/g' plugins/CMakeLists.txt
# fix MSYS2 system path
sed -i -e 's/$ENV{SystemDrive}\/msys64/D:\/a\/_temp\/msys64/g' platforms/windows/CMakeLists.txt
# fix project path in NSIS script
sed -i -e 's/c\:\\projects/d:\\a\\qlcplus/g' platforms/windows/${{env.NSIS_SCRIPT}}
- name: Fix 32 bit build
if: ${{ matrix.task == 'compile-qt5-32bit' }}
shell: msys2 {0}
run: |
# fix system libs path
sed -i -e 's/mingw64/mingw32/g' platforms/windows/CMakeLists.txt
# fix gcc lib
sed -i -e 's/libgcc_s_seh/libgcc_s_dw2/g' platforms/windows/CMakeLists.txt
# fix DMX USB path
sed -i -e 's/amd64/i386/g' plugins/dmxusb/src/CMakeLists.txt
sed -i -e 's/ftd2xx64.dll/ftd2xx.dll/g' plugins/dmxusb/src/CMakeLists.txt
- name: Configure v4 build for Windows
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5' || matrix.task == 'compile-qt5-32bit' }}
run: |
mkdir build
cd build
cmake -G "Unix Makefiles" ..
- name: Configure v5 build for Windows
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
mkdir build
cd build
cmake -G "Unix Makefiles" -Dqmlui=ON ..
- name: Build for Windows
shell: msys2 {0}
run: |
cd build
make -j${NPROC}
- name: Install on Windows
shell: msys2 {0}
run: |
cd build
make install/fast
cd ..
cp *.qm /c/qlcplus
- name: Build installation package
shell: msys2 {0}
run: |
cd /c/qlcplus
echo 'Creating package...'
makensis -X'SetCompressor /FINAL lzma' ${{env.NSIS_SCRIPT}}
mv /c/qlcplus/${{env.OUTFILE}} /d/a/qlcplus/qlcplus/${{matrix.task}}-${{env.OUTFILE}}
- name: Store executable artifact
uses: actions/upload-artifact@v4
with:
name: QLC+-${{matrix.task}}-${{env.APPVERSION}}-${{env.BUILD_DATE}}-${{env.GIT_REV}}.exe
path: ${{matrix.task}}-${{env.OUTFILE}}
build-macos:
runs-on: macos-13
name: QLCplus macOS ${{matrix.task}}
strategy:
fail-fast: false
matrix:
task: [ compile-qt5 ]
env:
CI_REPO_SLUG: ${{ github.repository }}
CI_BRANCH: ${{ github.head_ref }}
CI_PULL_REQUEST: ${{ github.event.number }}
QT_VERSION: "5.15.2"
QT_MODULES:
qtscript
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Add more ENV variables
shell: bash
run: |
echo "APPVERSION=`grep '^!qmlui' variables.pri | grep APPVERSION | sed 's/^.*= *//;s/ /_/g'`" >> $GITHUB_ENV
echo "BUILD_DATE=`date -u '+%Y%m%d'`" >> $GITHUB_ENV
echo "GIT_REV=`git rev-parse --short HEAD`" >> $GITHUB_ENV
echo "QTDIR=${{ github.workspace }}/qt/Qt/${{ env.QT_VERSION }}/clang_64" >> $GITHUB_ENV
echo "NPROC=`sysctl -n hw.ncpu`" >> $GITHUB_ENV
- name: Print ENV vars
shell: bash
run: |
echo "CI_BRANCH: ${CI_BRANCH}"
echo "CI_PULL_REQUEST: ${CI_PULL_REQUEST}"
echo "CI_REPO_SLUG: ${CI_REPO_SLUG}"
echo "CI_EVENT_TYPE: ${CI_EVENT_TYPE}"
echo "CI_SECURE_ENV_VARS: ${CI_SECURE_ENV_VARS}"
echo "TASK: ${TASK}"
echo "QTDIR: ${QTDIR}"
echo "NPROC: ${NPROC}"
- name: Dependencies
run: |
brew update
brew install fftw mad libsndfile libftdi
brew link --overwrite [email protected]
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
dir: "${{ github.workspace }}/qt/"
modules: ${{ env.QT_MODULES }}
- name: Configure build
shell: bash
run: |-
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="${{ env.QTDIR }}/lib/cmake" ..
- name: Build
shell: bash
run: |-
cd build
make -j${{ env.NPROC }}
- name: Install
shell: bash
run: |-
cd build
make install/fast
- name: Run macosdeploy
shell: bash
run: |-
${{ env.QTDIR }}/bin/macdeployqt ~/QLC+.app
- name: Fix more deps
shell: bash
run: |-
install_name_tool -change /usr/local/opt/fftw/lib/libfftw3.3.dylib @executable_path/../Frameworks/libfftw3.3.dylib ~/QLC+.app/Contents/MacOS/qlcplus
install_name_tool -change /usr/local/opt/fftw/lib/libfftw3.3.dylib @executable_path/../Frameworks/libfftw3.3.dylib ~/QLC+.app/Contents/MacOS/qlcplus-fixtureeditor
- name: create DMG
shell: bash
run: |-
OUTDIR=$PWD
cd platforms/macos/dmg
./create-dmg --volname "Q Light Controller Plus ${{env.APPVERSION}}" \
--volicon $OUTDIR/resources/icons/qlcplus.icns \
--background background.png \
--window-size 400 300 \
--window-pos 200 100 \
--icon-size 64 \
--icon "QLC+" 0 150 \
--app-drop-link 200 150 \
$OUTDIR/QLC+_${{ matrix.task }}.dmg \
~/QLC+.app
- name: Store DMG artifact
uses: actions/upload-artifact@v4
with:
name: QLC+-${{env.APPVERSION}}-${{env.BUILD_DATE}}-${{env.GIT_REV}}.dmg
path: QLC+_${{ matrix.task }}.dmg