From 42c5421510b146ccb4529c087532e6f0ce7a7c71 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 15 Oct 2024 09:20:09 -0500 Subject: [PATCH 1/4] Move to cppcheck 2.15.0 to fix build [decent_ci_skip] --- .github/workflows/test_code_integrity.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_code_integrity.yml b/.github/workflows/test_code_integrity.yml index 40b09e63a17..3ee772e332f 100644 --- a/.github/workflows/test_code_integrity.yml +++ b/.github/workflows/test_code_integrity.yml @@ -36,11 +36,11 @@ jobs: run: | mkdir cppcheck cd cppcheck - wget https://github.com/danmar/cppcheck/archive/2.10.tar.gz - tar xfz 2.10.tar.gz + wget https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz + tar xfz 2.15.0.tar.gz mkdir build cd build - cmake -DCMAKE_BUILD_TYPE=Release ../cppcheck-2.10/ + cmake -DCMAKE_BUILD_TYPE=Release ../cppcheck-2.15.0/ make -j $(nproc) sudo make install cd .. From 16bf66755c1872e1421e70c212810d530520ba4f Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 15 Oct 2024 09:47:08 -0500 Subject: [PATCH 2/4] Try just using cppcheck 2.13 from ubuntu 24 [decent_ci_skip] --- .github/workflows/test_code_integrity.yml | 33 ++--------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test_code_integrity.yml b/.github/workflows/test_code_integrity.yml index 3ee772e332f..5a6d4bca613 100644 --- a/.github/workflows/test_code_integrity.yml +++ b/.github/workflows/test_code_integrity.yml @@ -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 @@ -33,36 +33,7 @@ jobs: - name: Install cppcheck if: always() - run: | - mkdir cppcheck - cd cppcheck - wget https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz - tar xfz 2.15.0.tar.gz - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release ../cppcheck-2.15.0/ - 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 From 7998cf3bc36d606f535943ab9a4d9b71a7e87a1b Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 15 Oct 2024 10:09:10 -0500 Subject: [PATCH 3/4] Remove cppcheck-build-dir arg, disable some workflows temporarily [decent_ci_skip] --- .../{build_documentation.yml => build_documentation.yml.disable} | 0 .github/workflows/test_code_integrity.yml | 1 - .../{test_pull_requests.yml => test_pull_requests.yml.disable} | 0 3 files changed, 1 deletion(-) rename .github/workflows/{build_documentation.yml => build_documentation.yml.disable} (100%) rename .github/workflows/{test_pull_requests.yml => test_pull_requests.yml.disable} (100%) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml.disable similarity index 100% rename from .github/workflows/build_documentation.yml rename to .github/workflows/build_documentation.yml.disable diff --git a/.github/workflows/test_code_integrity.yml b/.github/workflows/test_code_integrity.yml index 5a6d4bca613..e3e228c5d62 100644 --- a/.github/workflows/test_code_integrity.yml +++ b/.github/workflows/test_code_integrity.yml @@ -41,7 +41,6 @@ jobs: # 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 diff --git a/.github/workflows/test_pull_requests.yml b/.github/workflows/test_pull_requests.yml.disable similarity index 100% rename from .github/workflows/test_pull_requests.yml rename to .github/workflows/test_pull_requests.yml.disable From 9e7fa7f8b88e405d11311170f3457fccf473f765 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 15 Oct 2024 10:26:47 -0500 Subject: [PATCH 4/4] Re-enable workflows. [decent_ci_skip] [skip actions] --- .../{build_documentation.yml.disable => build_documentation.yml} | 0 .../{test_pull_requests.yml.disable => test_pull_requests.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build_documentation.yml.disable => build_documentation.yml} (100%) rename .github/workflows/{test_pull_requests.yml.disable => test_pull_requests.yml} (100%) diff --git a/.github/workflows/build_documentation.yml.disable b/.github/workflows/build_documentation.yml similarity index 100% rename from .github/workflows/build_documentation.yml.disable rename to .github/workflows/build_documentation.yml diff --git a/.github/workflows/test_pull_requests.yml.disable b/.github/workflows/test_pull_requests.yml similarity index 100% rename from .github/workflows/test_pull_requests.yml.disable rename to .github/workflows/test_pull_requests.yml