2121 strategy :
2222 matrix :
2323 os : [ubuntu-20.04, ubuntu-22.04, macos-12]
24- include :
25- - use_qt6 : On
26- - os : ubuntu-20.04
27- use_qt6 : Off
2824 fail-fast : false # Prefer quick result
2925
3026 runs-on : ${{ matrix.os }}
4238 key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
4339
4440 - name : Install missing software on ubuntu
45- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
46- run : |
47- sudo apt-get update
48- sudo apt-get install libxml2-utils libtinyxml2-dev qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
49-
50- - name : Install missing software on ubuntu
51- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
41+ if : contains(matrix.os, 'ubuntu')
5242 run : |
5343 sudo apt-get update
5444 # qt6-tools-dev-tools for lprodump
@@ -65,13 +55,13 @@ jobs:
6555 - name : CMake build on ubuntu (with GUI / system tinyxml2)
6656 if : contains(matrix.os, 'ubuntu')
6757 run : |
68- 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
58+ 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
6959 cmake --build cmake.output.tinyxml2 -- -j$(nproc)
7060
7161 - name : CMake build on macos (with GUI / system tinyxml2)
7262 if : contains(matrix.os, 'macos')
7363 run : |
74- 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
64+ 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
7565 cmake --build cmake.output.tinyxml2 -- -j$(nproc)
7666
7767 - name : Run CMake test (system tinyxml2)
8373 strategy :
8474 matrix :
8575 os : [ubuntu-20.04, ubuntu-22.04, macos-12]
86- include :
87- - use_qt6 : On
88- - os : ubuntu-20.04
89- use_qt6 : Off
9076 fail-fast : false # Prefer quick result
9177
9278 runs-on : ${{ matrix.os }}
@@ -103,12 +89,6 @@ jobs:
10389 with :
10490 key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
10591
106- - name : Install missing software on ubuntu
107- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
108- run : |
109- sudo apt-get update
110- sudo apt-get install libxml2-utils qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
111-
11292 # TODO: move latest compiler to separate step
11393 # TODO: bail out on warnings with latest GCC
11494 - name : Set up GCC
@@ -124,7 +104,7 @@ jobs:
124104 echo "CXX=g++-13" >> $GITHUB_ENV
125105
126106 - name : Install missing software on ubuntu
127- if : contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
107+ if : contains(matrix.os, 'ubuntu')
128108 run : |
129109 sudo apt-get update
130110 # qt6-tools-dev-tools for lprodump
@@ -141,13 +121,13 @@ jobs:
141121 - name : CMake build on ubuntu (with GUI)
142122 if : contains(matrix.os, 'ubuntu')
143123 run : |
144- 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
124+ 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
145125 cmake --build cmake.output -- -j$(nproc)
146126
147127 - name : CMake build on macos (with GUI)
148128 if : contains(matrix.os, 'macos')
149129 run : |
150- 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
130+ 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
151131 cmake --build cmake.output -- -j$(nproc)
152132
153133 - name : Run CMake test
@@ -245,94 +225,6 @@ jobs:
245225 run : |
246226 ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
247227
248- build_qmake :
249-
250- strategy :
251- matrix :
252- # no longer build with qmake on MacOS as brew might lack pre-built Qt5 packages causing the step to run for hours
253- os : [ubuntu-20.04, ubuntu-22.04]
254- fail-fast : false # Prefer quick result
255-
256- runs-on : ${{ matrix.os }}
257-
258- steps :
259- - uses : actions/checkout@v4
260-
261- - name : Install missing software on ubuntu
262- if : contains(matrix.os, 'ubuntu')
263- run : |
264- sudo apt-get update
265- sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
266-
267- # coreutils contains "nproc"
268- - name : Install missing software on macos
269- if : contains(matrix.os, 'macos')
270- run : |
271- brew install coreutils qt@5
272- # expose qmake
273- brew link qt@5 --force
274-
275- - name : ccache
276- uses : hendrikmuhs/ccache-action@v1.2
277- with :
278- key : ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
279-
280- - name : Build GUI
281- run : |
282- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
283- pushd gui
284- qmake CONFIG+=debug CONFIG+=ccache HAVE_QCHART=yes
285- make -j$(nproc)
286-
287- # TODO: binaries are in a different location on macos
288- - name : Build and Run GUI tests
289- if : contains(matrix.os, 'ubuntu')
290- run : |
291- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
292- pushd gui/test/cppchecklibrarydata
293- qmake CONFIG+=debug CONFIG+=ccache
294- make -j$(nproc)
295- ./test-cppchecklibrarydata
296- popd
297- pushd gui/test/filelist
298- qmake CONFIG+=debug CONFIG+=ccache
299- make -j$(nproc)
300- ./test-filelist
301- popd
302- pushd gui/test/projectfile
303- qmake CONFIG+=debug CONFIG+=ccache
304- make -j$(nproc)
305- ./test-projectfile
306- popd
307- pushd gui/test/resultstree
308- qmake CONFIG+=debug CONFIG+=ccache
309- make -j$(nproc)
310- export QT_QPA_PLATFORM=offscreen
311- ./test-resultstree
312- popd
313- pushd gui/test/translationhandler
314- qmake CONFIG+=debug CONFIG+=ccache
315- make -j$(nproc)
316- # TODO: requires X session because of QApplication dependency in translationhandler.cpp
317- #./test-translationhandler
318- popd
319- pushd gui/test/xmlreportv2
320- qmake CONFIG+=debug CONFIG+=ccache
321- make -j$(nproc)
322- ./test-xmlreportv2
323-
324- - name : Generate Qt help file
325- run : |
326- pushd gui/help
327- qhelpgenerator online-help.qhcp -o online-help.qhc
328-
329- - name : Build triage
330- run : |
331- export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
332- pushd tools/triage
333- qmake CONFIG+=debug CONFIG+=ccache
334- make -j$(nproc)
335-
336228 build :
337229
338230 strategy :
0 commit comments