diff --git a/.clazy b/.clazy deleted file mode 100644 index 5f0dce62..00000000 --- a/.clazy +++ /dev/null @@ -1,7 +0,0 @@ -#do not report clazy results for these subdirs -#libkode is a separate project that we care about -SKIP /libkode/ - -#clazy checks specification -#currently there are more than 1000 qstring-allocation issues -CHECKS level2,no-qstring-allocations,no-fully-qualified-moc-types diff --git a/.github/workflows/nightly.yml b/.github/workflows/tidyclazy.yml similarity index 64% rename from .github/workflows/nightly.yml rename to .github/workflows/tidyclazy.yml index c7673f2a..9a8d0639 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/tidyclazy.yml @@ -2,15 +2,19 @@ # # SPDX-License-Identifier: MIT -name: CI Nightly +name: Tidy and Clazy on: - schedule: - - cron: '0 3 * * *' - -env: - CLAZY_CHECKS: "level2,no-qstring-allocations,no-fully-qualified-moc-types" - CLAZY_IGNORE_DIRS: ".*libkode.*" + push: + branches: + - master + - kdsoap-2.1 + - kdsoap-2.2 + pull_request: + branches: + - master + - kdsoap-2.1 + - kdsoap-2.2 jobs: build: @@ -23,11 +27,11 @@ jobs: config: - name: clang-tidy - cmake_arg: '-DCMAKE_CXX_CLANG_TIDY=clang-tidy' + preset: "clang-tidy" qt_version: "6.6" - name: clazy - cmake_arg: '-DCMAKE_CXX_COMPILER=clazy' + preset: "clazy" qt_version: "6.6" apt_pgks: - clazy @@ -48,22 +52,15 @@ jobs: sudo apt update -qq echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y - - uses: actions/checkout@v4 - with: - ref: 'master' # schedule.cron do not allow branch setting + - name: Checkout sources + uses: actions/checkout@v4 - name: Fetch Git submodules run: git submodule update --init --recursive - name: Configure project run: > - cmake -S . -B ./build -G Ninja ${{ matrix.config.cmake_arg }} - -DCMAKE_BUILD_TYPE=Release - --warn-uninitialized -Werror=dev - -DCMAKE_BUILD_TYPE=Debug - -DKDSoap_QT6=ON - -DKDSoap_TESTS=ON + cmake --preset=${{ matrix.config.preset }} - name: Build Project - id: ctest - run: cmake --build ./build + run: cmake --build --preset=${{ matrix.config.preset }} diff --git a/CMakePresets.json b/CMakePresets.json index f29c7f93..f505e457 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -62,6 +62,15 @@ "CCACHE_DISABLE": "ON" } }, + { + "name": "clang-tidy", + "inherits": "dev", + "cacheVariables": { + "KDSoap_EXAMPLES": "OFF", + "KDSoap_TESTS": "OFF", + "CMAKE_CXX_CLANG_TIDY": "clang-tidy" + } + }, { "name": "release", "inherits": "base", @@ -82,9 +91,14 @@ "name": "clazy", "configurePreset": "clazy", "environment": { - "CLAZY_CHECKS": "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo,no-skipped-base-method", - "CCACHE_DISABLE": "ON" + "CLAZY_CHECKS": "level2,no-qstring-allocations,no-fully-qualified-moc-types", + "CCACHE_DISABLE": "ON", + "CLAZY_IGNORE_DIRS": ".*libkode.*" } + }, + { + "name": "clang-tidy", + "configurePreset": "clang-tidy" } ] }