Skip to content

Typo fix in CI workflow file #4

Typo fix in CI workflow file

Typo fix in CI workflow file #4

name: Static Analysis
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create static_analysis directory
run: mkdir -p static_analysis
- name: Run Cppcheck
run: |
sudo apt-get install -y cppcheck
cppcheck --enable=all --inconclusive --force --language=c++ --file-list=<(find lwlog/src/ -name "*.cpp" -o -name "*.h") &> static_analysis/cppcheck.txt
continue-on-error: true
- name: Upload Cppcheck Results
uses: actions/upload-artifact@v3
with:
name: cppcheck_results
path: static_analysis/cppcheck.txt
clang-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create static_analysis directory
run: mkdir -p static_analysis
- name: Install Dependencies
run: sudo apt-get install -y build-essential cmake
- name: Generate compile_commands.json
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1
- name: Run Clang-Tidy
run: |
sudo apt-get install -y clang-tidy
find lwlog/src/ -name "*.cpp" -o -name "*.h" | xargs clang-tidy -p=build/compile_commands.json &> static_analysis/clang-tidy.txt
continue-on-error: true
- name: Upload Clang-Tidy Results
uses: actions/upload-artifact@v3
with:
name: clangtidy_results
path: static_analysis/clang-tidy.txt