mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-14 15:33:26 +00:00
Compare commits
4 Commits
v4.8.0
...
copilot/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6d669f2c7 | ||
|
|
26fa49077f | ||
| fee135d82e | |||
| e8c7abf925 |
63
.github/workflows/clang-tidy.yml
vendored
Normal file
63
.github/workflows/clang-tidy.yml
vendored
Normal 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
24
.vscode/launch.json
vendored
Normal 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}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ set_target_properties(
|
|||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
find_package(glfw3 CONFIG 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)
|
if(OMATH_ENABLE_VALGRIND)
|
||||||
omath_setup_valgrind(example_projection_matrix_builder)
|
omath_setup_valgrind(example_projection_matrix_builder)
|
||||||
|
|||||||
@@ -27,10 +27,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"examples": {
|
"examples": {
|
||||||
"description": "Build benchmarks",
|
"description": "Build examples",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"glfw3",
|
"glfw3",
|
||||||
"glew"
|
"glew",
|
||||||
|
"opengl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"imgui": {
|
"imgui": {
|
||||||
|
|||||||
Reference in New Issue
Block a user