diff --git a/.clang-tidy b/.clang-tidy index cdfaf8b2..eff71a3e 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,18 +3,20 @@ Checks: "*, -abseil-*, -altera-*, -android-*, + -bugprone-suspicious-include, + -clang-diagnostic-ignored-optimization-argument, + -cppcoreguidelines-non-private-member-variables-in-classes, -fuchsia-*, -google-*, -llvm*, + -misc-non-private-member-variables-in-classes, -modernize-use-trailing-return-type, - -zircon-*, + -readability-avoid-const-params-in-decls, -readability-else-after-return, -readability-static-accessed-through-instance, - -readability-avoid-const-params-in-decls, - -cppcoreguidelines-non-private-member-variables-in-classes, - -misc-non-private-member-variables-in-classes, + -zircon-*, " -WarningsAsErrors: '' +WarningsAsErrors: 'c*' HeaderFilterRegex: '' FormatStyle: none diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45b9beda..bf403ada 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,8 +35,8 @@ jobs: - windows-2022 compiler: # you can specify the version after `-` like "llvm-15.0.2". - - llvm-15.0.2 - - gcc-13 + - llvm-${CLANG_TIDY_VERSION} + - gcc generator: - "Ninja Multi-Config" build_type: @@ -50,17 +50,17 @@ jobs: exclude: # mingw is determined by this author to be too buggy to support - - os: windows-2019 - compiler: gcc-13 + - os: windows-latest + compiler: gcc include: # Add appropriate variables for gcov version required. This will intentionally break # if you try to use a compiler that does not have gcov set - - compiler: gcc-13 + - compiler: gcc gcov_executable: gcov enable_ipo: On - - compiler: llvm-15.0.2 + - compiler: llvm-${CLANG_TIDY_VERSION} enable_ipo: Off gcov_executable: "llvm-cov gcov" @@ -73,8 +73,8 @@ jobs: package_generator: TBZ2 # This exists solely to make sure a non-multiconfig build works - - os: ubuntu-20.04 - compiler: gcc-13 + - os: ubuntu-latest + compiler: gcc generator: "Unix Makefiles" build_type: Debug gcov_executable: gcov diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e21dc29e..66469ad7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,60 +48,60 @@ jobs: steps: - - uses: actions/checkout@v3 - - - name: Setup Cache - uses: ./.github/actions/setup_cache - with: - compiler: ${{ matrix.compiler }} - build_type: ${{ matrix.build_type }} - packaging_maintainer_mode: ${{ matrix.packaging_maintainer_mode }} - generator: ${{ matrix.generator }} - - - name: Project Name - uses: cardinalby/export-env-action@v2 - with: - envFile: '.github/constants.env' - - - - name: Setup Cpp - uses: aminya/setup-cpp@v1 - with: - compiler: ${{ matrix.compiler }} - vcvarsall: ${{ contains(matrix.os, 'windows' )}} - - cmake: true - ninja: true - vcpkg: false - ccache: true - clangtidy: false - - cppcheck: false - - gcovr: false - opencppcoverage: false - - # make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage - # has meaningful results - - name: Configure CMake - run: | - cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -D${{ env.PROJECT_NAME }}_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.packaging_maintainer_mode}} -D${{ env.PROJECT_NAME }}_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - - name: Build - # Execute the build. You can specify a specific target with "--target " - run: | - cmake --build ./build --config ${{matrix.build_type}} - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - uses: actions/checkout@v3 + + - name: Setup Cache + uses: ./.github/actions/setup_cache + with: + compiler: ${{ matrix.compiler }} + build_type: ${{ matrix.build_type }} + packaging_maintainer_mode: ${{ matrix.packaging_maintainer_mode }} + generator: ${{ matrix.generator }} + + - name: Project Name + uses: cardinalby/export-env-action@v2 + with: + envFile: '.github/constants.env' + + + - name: Setup Cpp + uses: aminya/setup-cpp@v1 + with: + compiler: ${{ matrix.compiler }} + vcvarsall: ${{ contains(matrix.os, 'windows' )}} + + cmake: true + ninja: true + vcpkg: false + ccache: true + clangtidy: false + + cppcheck: false + + gcovr: false + opencppcoverage: false + + # make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage + # has meaningful results + - name: Configure CMake + run: | + cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -D${{ env.PROJECT_NAME }}_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.packaging_maintainer_mode}} -D${{ env.PROJECT_NAME }}_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + + - name: Build + # Execute the build. You can specify a specific target with "--target " + run: | + cmake --build ./build --config ${{matrix.build_type}} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/template-janitor.yml b/.github/workflows/template-janitor.yml index b9b18639..a730a3ef 100644 --- a/.github/workflows/template-janitor.yml +++ b/.github/workflows/template-janitor.yml @@ -129,7 +129,6 @@ jobs: envFile: '.github/constants.env' - - name: Test simple configuration to make sure nothing broke run: | cmake -S . -B ./build -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} -D${{ env.NEW_SAFE_PROJECT }}_PACKAGING_MAINTAINER_MODE:BOOL=ON @@ -149,7 +148,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - template-rename: name: Renames template when a new name is detected runs-on: ubuntu-latest