Commit Graph

275 Commits

Author SHA1 Message Date
Oliver Stöneberg f61003d954
scriptcheck.yml: make dmake a separate job and run it on multiple platforms (#5632)
This is essentially an unit test for the `FileLister` so we should make
sure we have proper coverage.
2023-11-08 09:29:40 +01:00
Daniel Marjamäki fc8c244675
CI: Add selfcheck using Cppcheck Premium. Activates Misra C++ 2008 and Cert C++ 2016 checkers. (#5623) 2023-11-06 15:31:47 +01:00
Oliver Stöneberg f62caa6739
updated Qt in CI to 6.6.0 and removed commercial-only LTS Qt versions (#5561)
Updates for the Qt 6.2.x and 6.5.x LTS versions are only being provided
to commercial customers so the latest version is the only feasible one
to use.

Builds with older 6.x versions are still being tested implicitly by
using the Qt versions provided by the various distros.
2023-11-03 18:25:27 +01:00
Oliver Stöneberg 9280b5d7a5
CI-unixish.yml: removed `macos-11` builds and no longer build with qmake on MacOS (#5614)
Removed all `macos-11` builds as `brew` no longer supports it and we use
it in most steps:
```
Warning: You are using macOS 11.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
```

Also `brew` might no longer provide pre-built Qt5 packages which will
cause the step to run for hours as it will compile it on demand - see
https://github.com/danmar/cppcheck/actions/runs/6735637341/job/18314354679
for such an instance.
2023-11-02 23:31:59 +01:00
Oliver Stöneberg e8671c92cc
CI-unixish-docker.yml: updated latest ubuntu to 23.10 (#5560) 2023-10-27 14:50:28 +02:00
Oliver Stöneberg fdb3de708e
fixed #12042 - deprecated building with Qt5 / build with Qt6 in CI / updated latest Qt in CI to 6.5.3 (#4957)
Qt 5.15 will be EOL on May 26 so we should start switching away from it.
We already have issues with many of the previous versions and qmake on
legacy distros so we should cut that off.

I will add a Qt6 release build for Windows in another PR so it can be
tested. We should switch to it as the delivered build after the next
release and stop using Qt5 altogether in the CI in the release
afterwards (that would get rid of several build steps). We could leave
it so you could still try to build it but no longer support it so it is
up to the user to get it to work before removing it completely later on.
2023-10-26 14:55:59 +02:00
Oliver Stöneberg 5bebdf8b97
added simplecpp source to selfcheck (#5432)
We do not have Cppcheck available in the simplecpp CI so we should check
it here.
2023-10-26 10:52:44 +02:00
Oliver Stöneberg 5e89eb05a6
iwyu.yml: made `include-what-you-use` output more verbose / cleaned up includes (#5540) 2023-10-16 12:57:49 +02:00
Oliver Stöneberg 784b526365
installer: added missing library configurations and removed unneeded Qt DLLs / refs #10771 - added initial portable package (#4669) 2023-10-11 13:26:12 +02:00
Oliver Stöneberg 0f70f193ad
buildman.yml: fixed `manpage` job (#5539)
```
Invalid workflow file: .github/workflows/buildman.yml#L42
You have an error in your yaml syntax on line 42
```
2023-10-11 12:33:13 +02:00
Oliver Stöneberg 84f2485a26
fixed #7099 - added optional `man` target to CMake / build manpage in CI (#5536) 2023-10-09 22:20:36 +02:00
Oliver Stöneberg 2f62e9d316
mitigated several compiler warnings / suppress compiler warnings in CI where we don't care about them (#5497)
There's no need to generate any warnings in the CI unless we react on
them.
2023-10-09 12:25:56 +02:00
Oliver Stöneberg c969c331ea
fixed #12034 - release-windows.yml: specify proper openssl tool (#5522) 2023-10-09 12:15:46 +02:00
Oliver Stöneberg fc700b68eb
refs #4452 / refs #11705 - improved `--showtime=` behavior and testing (#4876)
This is a step onto leveraging the `ThreadExecutor` implementation for
`ProcessExecutor` which is a follow-up to #4870. We need to have the
proper test coverage and the existing implementations working as
expected before we move to the shared code.

Fixes:
- added `--showtime=` tests for all executor implementations
- only print `--showtime=summary` once at the end
- prevents `--showtime=` by multiple threads to be written at the same
time - essentially breaking the output
- reset the timer results before each test
- deprecated `top5` in favor of `top5_file`
- fixed printing for all executors except `ProcessExecutor`
2023-10-05 19:04:06 +02:00
Oliver Stöneberg 4afc29b999
updated latest Python in CI to 3.12 (#5505) 2023-10-04 10:09:49 +02:00
Daniel Marjamäki db5f75f741
manual: Add manual-premium.md for the Cppcheck Premium manual (#5492) 2023-09-28 13:30:58 +02:00
Oliver Stöneberg a3ff6d53c4
added `-Werror` to pytest calls and fixed reported warnings (#5483) 2023-09-26 15:31:37 +02:00
Oliver Stöneberg 176edbd22c
added `--strict` and `-vv` to pytest calls (#5453) 2023-09-18 13:57:27 +02:00
Oliver Stöneberg 9b3b477765
specify `gnu` library in selfcheck (#5436)
This should fix at least the following:
```
lib/color.cpp:33:43: debug: valueflow.cpp:10214:valueFlowConditionExpressions bailout: Skipping function due to incomplete variable STDOUT_FILENO [valueFlowBailoutIncompleteVar]
    static const bool stdout_tty = isatty(STDOUT_FILENO);
                                          ^
```
2023-09-11 19:59:58 +02:00
Oliver Stöneberg ce780177b2
fixed #11910 - removed Visual Studio x86 targets from project files and builds from CI (#5397)
Windows XP Pro x64 was released on April 25, 2005 and consumer
processors supporting x86-64 have been around almost as long. Although
there are still 32-bit Windows images available there is not much of a
point maintaining support for these. We also never did any x86 builds
for non-Windows platforms in CI so we don't even know if we work on
those. You might still be able to build 32-bit binaries via CMake.
2023-09-04 19:40:13 +02:00
Oliver Stöneberg c068c74e86
CI-mingw.yml: use pre-installed MinGW / also use `lld` and `ccache` for faster builds (#4400)
This used to be one of the longest running jobs because of the slow
setup and linking. Now it will take only ~2 minutes if everything is
cached with half the time taken up by the tests.
2023-09-04 13:56:18 +02:00
Oliver Stöneberg 37b2e50933
CI-windows.yml: perform debug and release builds in separate jobs (#5392)
The Windows jobs are along the longer jobs to run (~14 minutes) by
splitting these up we reduce the peak time to about half of that.
2023-09-01 20:03:53 +02:00
Oliver Stöneberg bf5e63300e
avoid duplicated workflow invocations for pushes in PRs made from root repository branches (#5377)
This will prevent duplicated workflows from being invoked for pushes
into pull requests made from branches in the root (`danmar`) repository
branches.
2023-09-01 18:52:20 +02:00
Daniel Marjamäki 7c992ced4c
Fixed #11901 (Performance regression: large array with strings) (#5375)
Analysis has slowed down a lot when there are many strings in an array.
2023-08-30 19:35:43 +02:00
Oliver Stöneberg 9d1bb5a580
CI-unixish-docker.yml: use `ubuntu:23.04` in `build_make` (#5373)
Forgot to update this in #4992.
2023-08-29 17:47:57 +02:00
Oliver Stöneberg d8b44dff56
fixed/suppressed several compiler warnings (#5327) 2023-08-16 19:35:53 +02:00
Oliver Stöneberg d076da8f7c
added missing `__GNUC__` define for selfcheck (#5324)
This was causing some code not to be enabled in the selfchecks leading
to some missing warnings.
2023-08-14 10:29:04 +02:00
Oliver Stöneberg 4e8c240129
updated CI to Clang 17 (#4797) 2023-08-09 12:45:15 +02:00
Oliver Stöneberg da6c39e971
iwyu.yml: actually disable archlinux step [skip ci] (#5287)
I accidentally left this own when I rolled back a previous attempt to
implement the conditional checks.
2023-08-02 14:49:48 +02:00
Oliver Stöneberg 45de338f1b
cleaned up includes based on include-what-you-use / iwyu.yml: updated to yet another distro to get the latest version and updated the Chaotic-AUR key (#5267)
This is a mess. The version is AUR is still outdated and also doesn't
install anymore. Fedora 38 carries the latest version of it so use that
now. Keep the old steps in case we need to switch again in the future.
2023-08-02 10:36:17 +02:00
Oliver Stöneberg 4452ae6d09
iwyu.yml: applied `apt.llvm.org` workaround as well [skip ci] (#5286) 2023-08-01 22:56:44 +02:00
chrchr-github bc54fab989
Workaround for CI failure (#5285)
From
https://github.com/llvm/llvm-project/issues/64182#issuecomment-1658085767
2023-08-01 14:28:13 +02:00
Oliver Stöneberg 5a322365a6
fixed `scriptcheck.yml` (#5268) 2023-08-01 13:06:12 +02:00
Daniel Marjamäki 2cd1f0f387
misra: Fix crash in misra_9x when there is unknown constant used as array size (#5229) 2023-07-10 12:25:28 +02:00
chrchr-github f4030c4b1a
Fix #11791 Build regression with GCC 13 (#5193)
Patch supplied by Joachim Reichel.
2023-06-26 11:15:41 +02:00
Daniel Marjamäki 91dedf05b5
Fix #11793 (False positive: Misra addon crash for struct initialization when struct has a function pointer array) (#5190) 2023-06-25 11:37:49 +02:00
Daniel Marjamäki 4f3cc168d1
CI: python 2.7 tests needs to run in a container (#5174)
Python 2.7 is not supported anymore in github actions runners.

See:
https://github.com/actions/setup-python/issues/672
2023-06-19 20:53:36 +02:00
Andrew C Aitchison 0727528876
The threadsafety.py addon now flags MT-Unsafe symbols and functions. (#5086) 2023-06-08 14:46:09 +02:00
Daniel Marjamäki 6b9fac41f4
Fixed #11734 (stylistic warnings from addons are not filtered when style is not enabled) (#5091) 2023-05-27 10:24:00 +02:00
chrchr-github fb850a844b
Use path to executable when trying to load library (#5082)
* Use path to executable when trying to load library

* Fix function call, add support for more OS, add test

* Format

* Handle MacOS

* Amend

* Argument as fallback

* Use Path::getCurrentExecutablePath()

* Move to cmdlineparser.cpp

* Debug output

* Use argv[0] in Cygwin

* Revert "Debug output"

This reverts commit 5a68d71f1d27549c7b4a46363f3cd5cd912018e7.

* Use native python in Cygwin
2023-05-26 06:55:36 +02:00
Oliver Stöneberg e6ae312a0b
moved more code into `HAVE_RULES` (#4956)
* moved more code into `HAVE_RULES`

* properly enable all internal and rules code in selfcheck

* updated TODOs in selfcheck

* testrunner.vcxproj.filters: updated

* added missing `Debug-PCRE` and `Release-PCRE` configurations for `testrunner` Visual Studio project

* cppcheck.cpp: fixed `useStlAlgorithm` selfcheck warning
2023-05-04 10:54:19 +02:00
Oliver Stöneberg b5ce2c708b
SingleExecutor: process markup files after code when scanning projects (#4972)
* SingleExecutor: added TODOs

* test `SingleExecutor` with files and project

* SingleExecutor: process markup files after code when scanning project

* TestSingleExecutor: generate scoped files before calling executor

* CI-unixish.yml: added `--output-on-failure` to CTest call

* helpers.cpp: improved error reporting in `~ScopedFile()`

* use unique filenames in executor tests to avoid collisions

* fixed `functionStatic` selfcheck warnings
2023-05-03 17:32:28 +02:00
Oliver Stöneberg 89b47e725f
CI-unixish.yml: added step to compile democlient (#4997)
* democlient.cpp: added missing copyright header

* CI-unixish.yml: added step to build democlient

* democlient.cpp: fixed GCC compiler warnings
2023-04-21 18:58:04 +02:00
Oliver Stöneberg 2364ff9765
CI-unixish-docker.yml: updated to ubuntu 23.04 (#4992) 2023-04-21 10:12:18 +02:00
Oliver Stöneberg 89c33b4175
CI-windows.yml: updated to Qt 6.5.0 (#4944) 2023-04-13 21:02:31 +02:00
Daniel Marjamäki 7726a5b5b3
Add a --check-level option (#4942) 2023-04-09 13:48:13 +02:00
Oliver Stöneberg b04812b0e8
CI-unixish-docker.yml: disabled precompiled headers when using `ccache` with CMake (#4943) 2023-04-08 22:21:11 +02:00
Oliver Stöneberg 5be8eee943
iwyu.yml: use a distro which has the latest `include-what-you-use` / enabled Qt mappings / cleaned up includes (#4885) 2023-04-08 16:08:47 +02:00
Oliver Stöneberg 5ec0ad6bed
use `ccache` for sanitizer builds / do not use precompiled headers with `ccache` (#4910)
* added CMake option `DISABLE_DMAKE` to disable `run-dmake` dependencies

* tools/CMakeLists.txt: added TODO

* use `ccache` for sanitizer builds

* aligned selfcheck between sanitizer workflows and disabled some currently unnecessary steps

* CI-unixish.yml: do not use precompiled headers with `ccache`
2023-04-01 09:40:10 +02:00
Oliver Stöneberg 0b8af4fff7
some minor `QtCharts` usage cleanups (#4890) 2023-03-13 15:44:00 +01:00