Skip to content

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # to use node20 instead of node12 and node 16 which are deprecated
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2 # Use the latest major version for stability
with:
cmake-version: '3.26.3'
- name: Install dependencies
run: sudo apt-get install -y libgtest-dev libgmock-dev clang-tidy lcov #clang-format
- name: Configure CMake
run: |
rm -rf build
mkdir build
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_STANDARD=20 ..
- name: Build Main Executable and Test Executable
run: |
cd build
make

Check failure on line 32 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
- name: Analyze code with clang-tidy
run: |
cd build
# make clean # Ensure a clean build to run clang-tidy on all files
# cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
find ../src ../tests -name '*.cpp' | xargs clang-tidy -p .
#- name: Check code formatting with clang-format
# run: |
#find . -name '*.cpp' -o -name '*.h' | xargs clang-format -i
# cd build
# make clang-format-check
- name: Run Tests
run: |
cd build
ctest --output-on-failure
# - name: Generate code coverage
# run: |
# cd build
# lcov --capture --directory . --output-file coverage.info
# lcov --remove coverage.info '/usr/*' --output-file coverage.info
# lcov --list coverage.info
#
# - name: Upload code coverage results
# if: always()
# uses: actions/upload-artifact@v2
# with:
# name: coverage-results
# path: build/coverage.info