Skip to content

Update generate_api_docs.sh #674

Update generate_api_docs.sh

Update generate_api_docs.sh #674

Workflow file for this run

name: code analysis
on: [push, pull_request]
jobs:
core-guidelines:
name: core-guidelines-check
runs-on: windows-2022
defaults:
run:
working-directory: ${{ github.workspace }}/build
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-cmake
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
- name: cpp-core-guidelines-check
uses: microsoft/msvc-code-analysis-action@v0.1.1
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@v3
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
#############################################################################################################
clang-analyzers:
runs-on: ubuntu-24.04
strategy:
matrix:
tool: [
{ 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-18 clang-tools-18 clang-tidy-18 iwyu cppcheck
cxx: clang++-18
defaults:
run:
working-directory: ${{ github.workspace }}/build
name: ${{ matrix.tool.name }} (${{ matrix.cxx }})
steps:
- name: checkout-repo
uses: actions/checkout@v4
- 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@v4
with:
name: ${{ matrix.tool.name }}-analysis-results
path: ${{ github.workspace }}/build/${{ matrix.tool.name }}-out.txt
#############################################################################################################
codeql:
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- pkgs: clang-18
cxx: clang++-18
name: codeql (${{ matrix.cxx }})
defaults:
run:
working-directory: ${{ github.workspace }}/build
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-tools
run: sudo apt update && sudo apt install -y ${{ matrix.pkgs }}
- name: setup-codeql
uses: github/codeql-action/init@v3
with:
languages: cpp
config-file: ${{ github.workspace }}/.github/codeql/codeql-config.yml
- 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@v3