2020 strategy :
2121 matrix :
2222 os : [ubuntu-20.04, ubuntu-22.04, macos-12]
23- include :
24- - use_qt6 : On
25- - os : ubuntu-20.04
26- use_qt6 : Off
2723 fail-fast : false # Prefer quick result
2824
2925 runs-on : ${{ matrix.os }}
4137 key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
4238
4339 - name : Install missing software on ubuntu
44- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
45- run : |
46- sudo apt-get update
47- sudo apt-get install libxml2-utils libtinyxml2-dev qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
48-
49- - name : Install missing software on ubuntu
50- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
40+ if : contains(matrix.os, 'ubuntu')
5141 run : |
5242 sudo apt-get update
5343 # qt6-tools-dev-tools for lprodump
@@ -64,13 +54,13 @@ jobs:
6454 - name : CMake build on ubuntu (with GUI / system tinyxml2)
6555 if : contains(matrix.os, 'ubuntu')
6656 run : |
67- cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} - DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
57+ cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
6858 cmake --build cmake.output.tinyxml2 -- -j$(nproc)
6959
7060 - name : CMake build on macos (with GUI / system tinyxml2)
7161 if : contains(matrix.os, 'macos')
7262 run : |
73- cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On - DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
63+ cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
7464 cmake --build cmake.output.tinyxml2 -- -j$(nproc)
7565
7666 - name : Run CMake test (system tinyxml2)
8272 strategy :
8373 matrix :
8474 os : [ubuntu-20.04, ubuntu-22.04, macos-12]
85- include :
86- - use_qt6 : On
87- - os : ubuntu-20.04
88- use_qt6 : Off
8975 fail-fast : false # Prefer quick result
9076
9177 runs-on : ${{ matrix.os }}
@@ -102,12 +88,6 @@ jobs:
10288 with :
10389 key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
10490
105- - name : Install missing software on ubuntu
106- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
107- run : |
108- sudo apt-get update
109- sudo apt-get install libxml2-utils qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
110-
11191 # TODO: move latest compiler to separate step
11292 # TODO: bail out on warnings with latest GCC
11393 - name : Set up GCC
@@ -123,7 +103,7 @@ jobs:
123103 echo "CXX=g++-13" >> $GITHUB_ENV
124104
125105 - name : Install missing software on ubuntu
126- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
106+ if : contains(matrix.os, 'ubuntu')
127107 run : |
128108 sudo apt-get update
129109 # qt6-tools-dev-tools for lprodump
@@ -140,13 +120,13 @@ jobs:
140120 - name : CMake build on ubuntu (with GUI)
141121 if : contains(matrix.os, 'ubuntu')
142122 run : |
143- cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} - DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
123+ cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
144124 cmake --build cmake.output -- -j$(nproc)
145125
146126 - name : CMake build on macos (with GUI)
147127 if : contains(matrix.os, 'macos')
148128 run : |
149- cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On - DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
129+ cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
150130 cmake --build cmake.output -- -j$(nproc)
151131
152132 - name : Run CMake test
@@ -244,94 +224,6 @@ jobs:
244224 run : |
245225 ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
246226
247- build_qmake :
248-
249- strategy :
250- matrix :
251- # no longer build with qmake on MacOS as brew might lack pre-built Qt5 packages causing the step to run for hours
252- os : [ubuntu-20.04, ubuntu-22.04]
253- fail-fast : false # Prefer quick result
254-
255- runs-on : ${{ matrix.os }}
256-
257- steps :
258- - uses : actions/checkout@v4
259-
260- - name : Install missing software on ubuntu
261- if : contains(matrix.os, 'ubuntu')
262- run : |
263- sudo apt-get update
264- sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
265-
266- # coreutils contains "nproc"
267- - name : Install missing software on macos
268- if : contains(matrix.os, 'macos')
269- run : |
270- brew install coreutils qt@5
271- # expose qmake
272- brew link qt@5 --force
273-
274- - name : ccache
275- uses : hendrikmuhs/ccache-action@v1.2.11
276- with :
277- key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
278-
279- - name : Build GUI
280- run : |
281- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
282- pushd gui
283- qmake CONFIG+=debug CONFIG+=ccache HAVE_QCHART=yes
284- make -j$(nproc)
285-
286- # TODO: binaries are in a different location on macos
287- - name : Build and Run GUI tests
288- if : contains(matrix.os, 'ubuntu')
289- run : |
290- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
291- pushd gui/test/cppchecklibrarydata
292- qmake CONFIG+=debug CONFIG+=ccache
293- make -j$(nproc)
294- ./test-cppchecklibrarydata
295- popd
296- pushd gui/test/filelist
297- qmake CONFIG+=debug CONFIG+=ccache
298- make -j$(nproc)
299- ./test-filelist
300- popd
301- pushd gui/test/projectfile
302- qmake CONFIG+=debug CONFIG+=ccache
303- make -j$(nproc)
304- ./test-projectfile
305- popd
306- pushd gui/test/resultstree
307- qmake CONFIG+=debug CONFIG+=ccache
308- make -j$(nproc)
309- export QT_QPA_PLATFORM=offscreen
310- ./test-resultstree
311- popd
312- pushd gui/test/translationhandler
313- qmake CONFIG+=debug CONFIG+=ccache
314- make -j$(nproc)
315- # TODO: requires X session because of QApplication dependency in translationhandler.cpp
316- #./test-translationhandler
317- popd
318- pushd gui/test/xmlreportv2
319- qmake CONFIG+=debug CONFIG+=ccache
320- make -j$(nproc)
321- ./test-xmlreportv2
322-
323- - name : Generate Qt help file
324- run : |
325- pushd gui/help
326- qhelpgenerator online-help.qhcp -o online-help.qhc
327-
328- - name : Build triage
329- run : |
330- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
331- pushd tools/triage
332- qmake CONFIG+=debug CONFIG+=ccache
333- make -j$(nproc)
334-
335227 build :
336228
337229 strategy :
@@ -552,9 +444,9 @@ jobs:
552444 ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b1 --addon=naming.json --enable=internal lib || ec=1
553445 # check gui with qt settings
554446 mkdir b2
555- ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui || ec=1
447+ ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=68 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui || ec=1
556448 # self check test and tools
557449 ./cppcheck $selfcheck_options $cppcheck_options -Icli test/*.cpp tools/*.cpp || ec=1
558450 # triage
559- ./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage || ec=1
451+ ./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=68 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage || ec=1
560452 exit $ec
0 commit comments