Skip to content

Commit

Permalink
Merge pull request #10792 from NREL/FixCppCheckBuild
Browse files Browse the repository at this point in the history
Fix CppCheck Build
  • Loading branch information
Myoldmopar authored Oct 15, 2024
2 parents b46af9c + 9e7fa7f commit df85d41
Showing 1 changed file with 2 additions and 32 deletions.
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

4 comments on commit df85d41

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2916 of 2916 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: Build Failed

Failures:\n

API Test Summary

  • Failed: 10
  • notrun: 5

ConvertInputFormat Test Summary

  • Failed: 4
  • notrun: 1

integration Test Summary

  • Passed: 2
  • Failed: 796

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2098 of 2098 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.