Feature coding standard #130
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DSA-CI | |
on: | |
push: | |
branches: [ main, release ] | |
pull_request: | |
branches: [ main, release ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake clang clang-tidy libgtest-dev ninja-build | |
- name: Configure CMake (with Clang-Tidy) | |
run: | | |
cmake -S . -B build \ | |
-DENABLE_CLANG_TIDY=ON \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
-G Ninja | |
- name: Run Clang-Tidy | |
run: | | |
echo "Running Clang-Tidy..." | |
find SourceCodes Headers Tests -name '*.cpp' -o -name '*.h' | xargs clang-tidy -p build | |
continue-on-error: false # Fail pipeline if any warning occurs | |
- name: Build | |
run: cmake --build build | |
- name: Run tests | |
run: ctest --test-dir build --output-on-failure |