Skip to content

Commit 3afdd72

Browse files
Merge branch 'main' into chr_iswindows
2 parents 2f97117 + 34b9c45 commit 3afdd72

862 files changed

Lines changed: 131638 additions & 64299 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ Checks: >
1919
-openmp-*,
2020
-zircon-*,
2121
cert-err34-c,
22-
google-explicit-constructor,
22+
cppcoreguidelines-pro-type-static-cast-downcast,
2323
cppcoreguidelines-rvalue-reference-param-not-moved,
24+
google-explicit-constructor,
2425
-bugprone-assignment-in-if-condition,
2526
-bugprone-branch-clone,
2627
-bugprone-easily-swappable-parameters,
@@ -40,37 +41,44 @@ Checks: >
4041
-modernize-avoid-c-arrays,
4142
-modernize-deprecated-ios-base-aliases,
4243
-misc-include-cleaner,
44+
-misc-unused-using-decls,
4345
-modernize-loop-convert,
46+
-modernize-macro-to-enum,
4447
-modernize-raw-string-literal,
4548
-modernize-replace-auto-ptr,
4649
-modernize-return-braced-init-list,
47-
-modernize-use-auto,
50+
-modernize-type-traits,
51+
-modernize-use-designated-initializers,
52+
-modernize-use-nodiscard,
53+
-modernize-use-scoped-lock,
4854
-modernize-use-trailing-return-type,
4955
-performance-avoid-endl,
5056
-performance-inefficient-string-concatenation,
5157
-performance-no-automatic-move,
52-
-performance-noexcept-swap,
58+
-portability-avoid-pragma-once,
5359
-portability-simd-intrinsics,
5460
-portability-std-allocator-const,
55-
-readability-avoid-const-params-in-decls,
61+
-readability-avoid-nested-conditional-operator,
5662
-readability-braces-around-statements,
57-
-readability-const-return-type,
5863
-readability-container-data-pointer,
59-
-readability-convert-member-functions-to-static,
64+
-readability-enum-initial-value,
6065
-readability-function-cognitive-complexity,
6166
-readability-function-size,
6267
-readability-identifier-length,
6368
-readability-identifier-naming,
6469
-readability-implicit-bool-conversion,
6570
-readability-isolate-declaration,
6671
-readability-magic-numbers,
67-
-readability-redundant-access-specifiers,
6872
-readability-suspicious-call-argument,
69-
-readability-uppercase-literal-suffix
73+
-readability-uppercase-literal-suffix,
74+
-readability-use-concise-preprocessor-directives
7075
WarningsAsErrors: '*'
71-
HeaderFilterRegex: '(cli|gui|lib|oss-fuzz|test|triage)\/[a-z]+\.h'
76+
HeaderFilterRegex: '(cli|gui|frontend|lib|oss-fuzz|test|triage)\/[a-z_]+\.h'
77+
ExcludeHeaderFilterRegex: 'ui_.*.h'
7278
CheckOptions:
7379
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
7480
value: '1'
7581
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
7682
value: '0'
83+
- key: modernize-use-trailing-return-type.TransformFunctions
84+
value: false

.github/workflows/CI-cygwin.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# Some convenient links:
2-
# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
3-
#
4-
1+
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
2+
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
53
name: CI-cygwin
64

75
on:
86
push:
97
branches:
108
- 'main'
119
- 'releases/**'
10+
- '2.*'
1211
tags:
1312
- '2.*'
1413
pull_request:
@@ -21,11 +20,13 @@ defaults:
2120
shell: cmd
2221

2322
jobs:
23+
# TODO: add CMake build
2424
build_cygwin:
2525
strategy:
2626
matrix:
27-
os: [windows-2022]
28-
arch: [x64]
27+
# only use the latest windows-* as the installed toolchain is identical
28+
os: [windows-2025]
29+
platform: [x86_64]
2930
include:
3031
- platform: 'x86_64'
3132
packages: |
@@ -36,18 +37,20 @@ jobs:
3637
runs-on: ${{ matrix.os }}
3738

3839
steps:
39-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
4043

4144
- name: Set up Cygwin
4245
uses: cygwin/cygwin-install-action@master
4346
with:
44-
platform: ${{ matrix.arch }}
47+
platform: ${{ matrix.platform }}
4548
packages: ${{ matrix.packages }}
4649

4750
# Cygwin will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries.
4851
- name: Build all and run test
4952
run: |
50-
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j2 check
53+
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j%NUMBER_OF_PROCESSORS% CXXOPTS="-Werror" test
5154
5255
- name: Extra test for misra
5356
run: |

.github/workflows/CI-mingw.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# Some convenient links:
2-
# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
3-
#
4-
1+
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
2+
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
53
name: CI-mingw
64

75
on:
86
push:
97
branches:
108
- 'main'
119
- 'releases/**'
10+
- '2.*'
1211
tags:
1312
- '2.*'
1413
pull_request:
@@ -21,26 +20,33 @@ defaults:
2120
shell: msys2 {0}
2221

2322
jobs:
23+
# TODO: add CMake build
2424
build_mingw:
2525
strategy:
2626
matrix:
27-
# the MinGW installation in windows-2019 is supposed to be 8.1 but it is 12.2
28-
# the MinGW installation in windows-2022 is not including all necessary packages by default, so just use the older image instead - package versions are he same
29-
os: [windows-2019]
27+
# only use the latest windows-* as the installed toolchain is identical
28+
os: [windows-2025]
3029
fail-fast: false
3130

3231
runs-on: ${{ matrix.os }}
3332

33+
timeout-minutes: 19 # max + 3*std of the last 7K runs
34+
3435
steps:
35-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
3639

3740
- name: Set up MSYS2
3841
uses: msys2/setup-msys2@v2
3942
with:
4043
release: false # use pre-installed
44+
# TODO: install mingw-w64-x86_64-make and use mingw32.make instead - currently fails with "Windows Subsystem for Linux has no installed distributions."
4145
install: >-
4246
mingw-w64-x86_64-lld
4347
mingw-w64-x86_64-ccache
48+
make
49+
mingw-w64-x86_64-gcc
4450
4551
- name: ccache
4652
uses: hendrikmuhs/ccache-action@v1.2
@@ -51,22 +57,19 @@ jobs:
5157
run: |
5258
export PATH="/mingw64/lib/ccache/bin:$PATH"
5359
# set RDYNAMIC to work around broken MinGW detection
54-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 cppcheck
55-
env:
56-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
60+
# use lld for faster linking
61+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" cppcheck
5762
5863
- name: Build test
5964
run: |
6065
export PATH="/mingw64/lib/ccache/bin:$PATH"
6166
# set RDYNAMIC to work around broken MinGW detection
62-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 testrunner
63-
env:
64-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
67+
# use lld for faster linking
68+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" testrunner
6569
6670
- name: Run test
6771
run: |
6872
export PATH="/mingw64/lib/ccache/bin:$PATH"
6973
# set RDYNAMIC to work around broken MinGW detection
70-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 check
71-
env:
72-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
74+
# use lld for faster linking
75+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" test

.github/workflows/CI-unixish-docker.yml

Lines changed: 30 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,24 @@ on:
77
branches:
88
- 'main'
99
- 'releases/**'
10+
- '2.*'
1011
tags:
1112
- '2.*'
1213
pull_request:
1314

1415
permissions:
1516
contents: read
16-
17+
1718
jobs:
1819
build_cmake:
1920

2021
strategy:
2122
matrix:
22-
image: ["centos:7", "ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
23+
image: ["ubuntu:24.04"]
24+
include:
25+
- build_gui: false
26+
- image: "ubuntu:24.04"
27+
build_gui: true
2328
fail-fast: false # Prefer quick result
2429

2530
runs-on: ubuntu-22.04
@@ -33,72 +38,51 @@ jobs:
3338
image: ${{ matrix.image }}
3439

3540
steps:
36-
- uses: actions/checkout@v3
37-
38-
- name: Install missing software on CentOS 7
39-
if: matrix.image == 'centos:7'
40-
run: |
41-
yum install -y cmake gcc-c++ make pcre-devel
42-
yum --enablerepo=extras install -y epel-release
43-
yum install -y ccache
41+
- uses: actions/checkout@v4
42+
with:
43+
persist-credentials: false
4444

4545
- name: Install missing software on ubuntu
4646
if: contains(matrix.image, 'ubuntu')
4747
run: |
4848
apt-get update
4949
apt-get install -y cmake g++ make libxml2-utils libpcre3-dev
5050
51-
# required so a default Qt installation is configured
52-
- name: Install missing software on ubuntu 18.04
53-
if: false # matrix.os == 'ubuntu-18.04'
51+
- name: Install missing software (gui) on latest ubuntu
52+
if: matrix.build_gui
5453
run: |
55-
sudo apt-get install qt5-default
54+
apt-get install -y qt6-base-dev qt6-charts-dev qt6-tools-dev
5655
5756
# needs to be called after the package installation since
5857
# - it doesn't call "apt-get update"
59-
# - it doesn't support centos
6058
- name: ccache
6159
uses: hendrikmuhs/ccache-action@v1.2
62-
if: matrix.image != 'ubuntu:14.04' # no support for --set-config
6360
with:
6461
key: ${{ github.workflow }}-${{ matrix.image }}
6562

66-
# tests require CMake 3.9 - no ccache available
67-
- name: CMake build (no tests / no ccache)
68-
if: matrix.image == 'ubuntu:14.04'
63+
- name: CMake build
64+
if: ${{ !matrix.build_gui }}
6965
run: |
7066
mkdir cmake.output
7167
cd cmake.output
72-
cmake -G "Unix Makefiles" -DHAVE_RULES=On ..
68+
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
7369
cmake --build . -- -j$(nproc)
7470
75-
# tests require CMake 3.9 - ccache available
76-
- name: CMake build (no tests)
77-
if: matrix.image == 'centos:7' || matrix.image == 'ubuntu:16.04'
71+
- name: CMake build (with GUI)
72+
if: matrix.build_gui
7873
run: |
79-
mkdir cmake.output
80-
cd cmake.output
81-
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
82-
cmake --build . -- -j$(nproc)
83-
84-
- name: CMake build
85-
if: matrix.image != 'centos:7' && matrix.image != 'ubuntu:14.04' && matrix.image != 'ubuntu:16.04'
86-
run: |
87-
mkdir cmake.output
88-
cd cmake.output
89-
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
90-
cmake --build . -- -j$(nproc)
74+
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
75+
cmake --build cmake.output -- -j$(nproc)
9176
9277
- name: Run CMake test
93-
if: matrix.image != 'centos:7' && matrix.image != 'ubuntu:14.04' && matrix.image != 'ubuntu:16.04'
9478
run: |
9579
cmake --build cmake.output --target check -- -j$(nproc)
9680
9781
build_make:
9882

9983
strategy:
10084
matrix:
101-
image: ["centos:7", "ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
85+
image: ["ubuntu:24.04"]
10286
fail-fast: false # Prefer quick result
10387

10488
runs-on: ubuntu-22.04
@@ -107,14 +91,9 @@ jobs:
10791
image: ${{ matrix.image }}
10892

10993
steps:
110-
- uses: actions/checkout@v3
111-
112-
- name: Install missing software on CentOS 7
113-
if: matrix.image == 'centos:7'
114-
run: |
115-
yum install -y gcc-c++ make which python3 pcre-devel
116-
yum --enablerepo=extras install -y epel-release
117-
yum install -y ccache
94+
- uses: actions/checkout@v4
95+
with:
96+
persist-credentials: false
11897

11998
- name: Install missing software on ubuntu
12099
if: contains(matrix.image, 'ubuntu')
@@ -124,33 +103,29 @@ jobs:
124103
125104
# needs to be called after the package installation since
126105
# - it doesn't call "apt-get update"
127-
# - it doesn't support centos
128106
- name: ccache
129107
uses: hendrikmuhs/ccache-action@v1.2
130-
if: matrix.image != 'ubuntu:14.04' # no support for --set-config
131108
with:
132109
key: ${{ github.workflow }}-${{ matrix.image }}
133110

134111
- name: Build cppcheck
135112
run: |
136-
# "/usr/lib64" for centos / "/usr/lib" for ubuntu
137-
export PATH="/usr/lib64/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
138-
make -j$(nproc) HAVE_RULES=yes
113+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
114+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror"
139115
140116
- name: Build test
141117
run: |
142-
# "/usr/lib64" for centos / "/usr/lib" for ubuntu
143-
export PATH="/usr/lib64/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
144-
make -j$(nproc) testrunner HAVE_RULES=yes
118+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
119+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" testrunner
145120
146121
- name: Run test
147122
run: |
148-
make -j$(nproc) check HAVE_RULES=yes
123+
make -j$(nproc) HAVE_RULES=yes test
149124
150125
# requires python3
151126
- name: Run extra tests
152127
run: |
153-
tools/generate_and_run_more_tests.sh
128+
test/scripts/generate_and_run_more_tests.sh
154129
155130
# requires which
156131
- name: Validate
@@ -161,10 +136,3 @@ jobs:
161136
run: |
162137
./cppcheck --addon=threadsafety addons/test/threadsafety
163138
./cppcheck --addon=threadsafety --std=c++03 addons/test/threadsafety
164-
165-
- name: Generate Qt help file on ubuntu 18.04
166-
if: false # matrix.os == 'ubuntu-18.04'
167-
run: |
168-
pushd gui/help
169-
qcollectiongenerator online-help.qhcp -o online-help.qhc
170-

0 commit comments

Comments
 (0)