File tree Expand file tree Collapse file tree 2 files changed +33
-15
lines changed
Expand file tree Collapse file tree 2 files changed +33
-15
lines changed Original file line number Diff line number Diff line change 7575 cmake -B "${{github.workspace}}/${{ env.BUILD_DIR }}" --preset "x64-ClangCL-Windows-Debug" -Dmyproject_ENABLE_CPPCHECK="OFF" -DWINDOWS_CI=ON
7676 cmake --build "${{github.workspace}}/${{ env.BUILD_DIR }}" --preset "x64-ClangCL-Windows-Debug"
7777 ctest
78-
78+
79+ - name : Run clang-tidy
80+ shell : pwsh
81+ continue-on-error : true
82+ run : |
83+ $sourceFiles = Get-ChildItem -Path "Src" -Recurse -Include "*.cpp", "*.cc" | ForEach-Object { $_.FullName }
84+ clang-tidy -p="${{github.workspace}}/${{ env.BUILD_DIR }}/compile_commands.json" $sourceFiles
85+
86+ - name : Run Clang static analysis (HTML)
87+ shell : pwsh
88+ continue-on-error : true
89+ run : |
90+ # HTML output (correct flag form)
91+ $sourceFiles = Get-ChildItem -Path "Src" -Recurse -Include "*.cpp", "*.cc" | ForEach-Object { $_.FullName }
92+ clang++ --analyze -Xanalyzer -analyzer-output=html $sourceFiles
93+
94+ - name : Run Clang static analysis (scan-build)
95+ shell : pwsh
96+ continue-on-error : true
97+ run : |
98+ New-Item -ItemType Directory -Path "scan-build-reports" -Force
99+ scan-build -o scan-build-reports cmake --build "$env:WORKSPACE/$env:BUILD_DIR" --preset "$env:CLANG_DEBUG_PRESET"
79100 # ################################################################################################################
80101 # ################################## Now run release and build package for clang #################################
81102 # ################################################################################################################
Original file line number Diff line number Diff line change @@ -53,21 +53,18 @@ $SUDO apt-get install -y dpkg-dev fakeroot binutils
5353# -----------------------------------------------------------------------------
5454# Purge older distro cmake if present (ignore errors)
5555$SUDO apt-get purge --auto-remove -y cmake || true
56+ $SUDO apt-get update -y
57+ echo " Installing latest CMake..."
58+ KITWARE_KEY=/usr/share/keyrings/kitware-archive-keyring.gpg
59+ wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc \
60+ | gpg --dearmor \
61+ | $SUDO tee " $KITWARE_KEY " > /dev/null
62+ echo " deb [signed-by=$KITWARE_KEY ] https://apt.kitware.com/ubuntu $DISTRO main" \
63+ | $SUDO tee /etc/apt/sources.list.d/kitware.list > /dev/null
64+ $SUDO apt-get update -y
65+ $SUDO apt-get install -y cmake
66+ cmake --version
5667
57- if ! command -v cmake > /dev/null 2>&1 ; then
58- echo " Installing latest CMake..."
59- KITWARE_KEY=/usr/share/keyrings/kitware-archive-keyring.gpg
60- wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc \
61- | gpg --dearmor \
62- | $SUDO tee " $KITWARE_KEY " > /dev/null
63- echo " deb [signed-by=$KITWARE_KEY ] https://apt.kitware.com/ubuntu $DISTRO main" \
64- | $SUDO tee /etc/apt/sources.list.d/kitware.list > /dev/null
65- $SUDO apt-get update -y
66- $SUDO apt-get install -y cmake
67- cmake --version
68- else
69- echo " cmake already installed: $( cmake --version | head -n1) "
70- fi
7168
7269# -----------------------------------------------------------------------------
7370# Vulkan SDK Installation Function for Tarball
You can’t perform that action at this time.
0 commit comments