Skip to content

use the default algorithm when set to nullptr #304

use the default algorithm when set to nullptr

use the default algorithm when set to nullptr #304

Workflow file for this run

name: code analysis
on: [push, pull_request]
jobs:
core-guidelines:
name: core-guidelines-check
runs-on: windows-2022
# Allow failures because of the internal compiler error with reference_lines.cpp
continue-on-error: true
defaults:
run:
working-directory: ${{ github.workspace }}/build
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: setup-cmake
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
- name: cpp-core-guidelines-check
uses: microsoft/[email protected]
id: run-analysis
with:
ruleset: ${{ github.workspace }}/core-guidelines.ruleset
cmakeBuildDirectory: ${{ github.workspace }}/build
buildConfiguration: Release
ignoredPaths: ${{ github.workspace }}/test;${{ github.workspace }}/examples
- name: upload-sarif
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
#############################################################################################################
clang-analyzers:
runs-on: ubuntu-22.04
strategy:
matrix:
tool: [
{ name: iwyu, cmake-flag: CMAKE_CXX_INCLUDE_WHAT_YOU_USE="iwyu;-Xiwyu;--mapping_file=../.iwyu-mappings" },
{ name: clang-tidy, cmake-flag: CMAKE_CXX_CLANG_TIDY="clang-tidy" },
{ name: cppcheck, cmake-flag: CMAKE_CXX_CPPCHECK="cppcheck;--version;--verbose;--report-progress;--enable=all;--error-exitcode=1;--std=c++20;--suppressions-list=../.cppcheck-supressions" }
]
include:
- pkgs: clang-15 llvm-15-dev libclang-15-dev clang-tools-15 clang-tidy-15 iwyu cppcheck
cxx: clang++-15
defaults:
run:
working-directory: ${{ github.workspace }}/build
name: ${{ matrix.tool.name }}
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: setup-tools
run: sudo apt update && sudo apt install -y ${{ matrix.pkgs }}
- name: setup-analysis
env:
CXX: ${{ matrix.cxx }}
run: cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -D${{ matrix.tool.cmake-flag }}
- name: run-analysis
run: cmake --build . --parallel --target gapp 2>&1 | tee ${{ matrix.tool.name }}-out.txt
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.tool.name }}-analysis-results
path: ${{ github.workspace }}/build/${{ matrix.tool.name }}-out.txt
#############################################################################################################
codeql:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- pkgs: clang-15 libtbb-dev
cxx: clang++-15
name: codeql
defaults:
run:
working-directory: ${{ github.workspace }}/build
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: setup-tools
run: sudo apt update && sudo apt install -y ${{ matrix.pkgs }}
- name: setup-codeql
uses: github/codeql-action/init@v2
with:
languages: cpp
queries: security-and-quality
- name: setup-build
env:
CXX: ${{ matrix.cxx }}
run: cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF
- name: build
run: cmake --build . --target gapp
- name: run-analysis
uses: github/codeql-action/analyze@v2