Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CppCheck Build #10792

Merged
merged 4 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions .github/workflows/test_code_integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
code_integrity_checks:
name: Static Code Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -33,44 +33,14 @@ jobs:

- name: Install cppcheck
if: always()
run: |
mkdir cppcheck
cd cppcheck
wget https://github.com/danmar/cppcheck/archive/2.10.tar.gz
tar xfz 2.10.tar.gz
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../cppcheck-2.10/
make -j $(nproc)
sudo make install
cd ..
rm -Rf cppcheck
- name: Cache cppcheck-build-directory
if: always()
id: cppcheckcache
uses: actions/cache@v4
with:
path: .cppcheck-build-dir/
key: cppcheckcache

- name: cppcheck-build-directory not found
# If the build cache wasn't found in the cache
if: always() && steps.cppcheckcache.outputs.cache-hit != 'true'
run: mkdir .cppcheck-build-dir

- name: cppcheck-build-directory was found
# If the build cache wasn't found in the cache
if: always() && steps.cppcheckcache.outputs.cache-hit == 'true'
run: ls .cppcheck-build-dir/ || true
run: sudo apt-get install cppcheck

- name: Run CppCheck
id: cpp_check_run
if: always()
# TODO: Evaluate the long list of flags here
run: >
cppcheck
--cppcheck-build-dir=.cppcheck-build-dir
-D__cppcheck__ -UEP_Count_Calls -DEP_NO_OPENGL -UGROUND_PLOT -DLINK_WITH_PYTHON -DMSVC_DEBUG -DSKYLINE_MATRIX_REMOVE_ZERO_COLUMNS -U_OPENMP -Ugeneratetestdata
-DEP_cache_GlycolSpecificHeat -DEP_cache_PsyTsatFnPb -UEP_nocache_Psychrometrics -UEP_psych_errors -UEP_psych_stats
--force
Expand Down