Compare commits

...

4 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a6d669f2c7 Add automatic clang-tidy scan workflow in CI pipeline
Co-authored-by: orange-cpp <59374393+orange-cpp@users.noreply.github.com>
2026-02-13 16:06:14 +00:00
copilot-swe-agent[bot]
26fa49077f Initial plan 2026-02-13 16:03:03 +00:00
fee135d82e added vscode config 2026-02-12 23:13:37 +03:00
e8c7abf925 fix 2026-02-08 20:57:10 +03:00
4 changed files with 91 additions and 3 deletions

63
.github/workflows/clang-tidy.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Clang-Tidy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
concurrency:
group: clang-tidy-${{ github.ref }}
cancel-in-progress: true
jobs:
clang-tidy:
name: Clang-Tidy Analysis
runs-on: ubuntu-latest
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- name: Install toolchain
shell: bash
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
sudo apt-get update
sudo apt-get install -y git build-essential cmake ninja-build \
zip unzip curl pkg-config ca-certificates \
clang-21 lld-21 libc++-21-dev libc++abi-21-dev \
clang-tidy-21
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-21 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-21 100
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-21 100
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 100
- name: Checkout repository (with sub-modules)
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up vcpkg
shell: bash
run: |
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
cd "$VCPKG_ROOT"
./bootstrap-vcpkg.sh
- name: Configure (cmake --preset)
shell: bash
run: |
cmake --preset linux-release-vcpkg \
-DVCPKG_INSTALL_OPTIONS="--allow-unsupported" \
-DOMATH_BUILD_TESTS=ON \
-DOMATH_BUILD_BENCHMARK=OFF \
-DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
- name: Run clang-tidy
shell: bash
run: |
find source include \( -name '*.cpp' -o -name '*.hpp' \) -print0 | \
xargs -0 clang-tidy -p cmake-build/build/linux-release-vcpkg

24
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": " Unit Tests (Debug)",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/out/Debug/unit_tests",
"args": [],
"cwd": "${workspaceRoot}"
},
{
"name": " Unit Tests (Release)",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/out/Release/unit_tests",
"args": [],
"cwd": "${workspaceRoot}"
}
]
}

View File

@@ -29,7 +29,7 @@ set_target_properties(
find_package(OpenGL)
find_package(GLEW REQUIRED)
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(example_glfw3 PRIVATE omath::omath GLEW::GLEW glfw OpenGL::OpenGL)
target_link_libraries(example_glfw3 PRIVATE omath::omath GLEW::GLEW glfw OpenGL::GL)
if(OMATH_ENABLE_VALGRIND)
omath_setup_valgrind(example_projection_matrix_builder)

View File

@@ -27,10 +27,11 @@
]
},
"examples": {
"description": "Build benchmarks",
"description": "Build examples",
"dependencies": [
"glfw3",
"glew"
"glew",
"opengl"
]
},
"imgui": {