From d322999be15c16467d923e1e3869eda00e81018f Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Thu, 23 Jan 2025 15:30:06 +0000 Subject: [PATCH 01/10] Update upload-artifact version Signed-off-by: Gaurav Aggarwal --- clang-formatting/action.yml | 2 +- coverage-cop/action.yml | 2 +- formatting/action.yml | 2 +- run_cbmc/action.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-formatting/action.yml b/clang-formatting/action.yml index 78b72c2d..a299d93b 100644 --- a/clang-formatting/action.yml +++ b/clang-formatting/action.yml @@ -128,7 +128,7 @@ runs: - name: Upload Formatting Git Patch if: failure() && ( steps.action-formatting-check.outcome == 'failure' ) id: upload-formatting-patch - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: formattingChanges path: ${{ inputs.path }}/formattingChanges.patch diff --git a/coverage-cop/action.yml b/coverage-cop/action.yml index 6f983265..19941f4b 100644 --- a/coverage-cop/action.yml +++ b/coverage-cop/action.yml @@ -80,7 +80,7 @@ runs: - name: Upload Failed Codecov HTML Report if: failure() && ( steps.action-check-line-and-branch-coverage.outcome == 'failure' ) id: upload-codecov-report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: CodecovHTMLReport path: CodecovHTMLReport.zip diff --git a/formatting/action.yml b/formatting/action.yml index e6371547..08c07c45 100644 --- a/formatting/action.yml +++ b/formatting/action.yml @@ -128,7 +128,7 @@ runs: - name: Upload Formatting Git Patch if: failure() && ( steps.action-formatting-check.outcome == 'failure' ) id: upload-formatting-patch - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: formattingChanges path: ${{ inputs.path }}/formattingChanges.patch diff --git a/run_cbmc/action.yml b/run_cbmc/action.yml index 3afb4f78..f4daf902 100644 --- a/run_cbmc/action.yml +++ b/run_cbmc/action.yml @@ -94,7 +94,7 @@ runs: stepName: Upload zip artifact of CBMC proof results to GitHub Actions name: ${{ env.stepName }} if: ${{ env.REPO_VISIBILITY == 'public' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact.outputs.name }} path: ${{ steps.artifact.outputs.name }}.zip From b1ed0d54a8b1ecfec99c49de60c9d36fd9c4fe90 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Thu, 23 Jan 2025 15:56:15 +0000 Subject: [PATCH 02/10] Fix doxygen installation Signed-off-by: Gaurav Aggarwal --- doxygen-generation/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doxygen-generation/action.yml b/doxygen-generation/action.yml index 880fa5b2..9342eb45 100644 --- a/doxygen-generation/action.yml +++ b/doxygen-generation/action.yml @@ -26,7 +26,7 @@ inputs: doxygen_dependencies: description: 'Space-separated dependencies for doxygen.' required: false - default: libclang-11-dev libclang-cpp11 graphviz + default: libclang-18-dev libclang-cpp18 graphviz runs: using: "composite" From 2c9d7365be9530e08f2618cf626497cfc29b13b2 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Thu, 23 Jan 2025 16:02:08 +0000 Subject: [PATCH 03/10] Fix doxygen installation Signed-off-by: Gaurav Aggarwal --- doxygen/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doxygen/action.yml b/doxygen/action.yml index 73e7d310..86bb3cd8 100644 --- a/doxygen/action.yml +++ b/doxygen/action.yml @@ -16,7 +16,7 @@ inputs: doxygen_dependencies: description: 'Space-separated dependencies for doxygen.' required: false - default: libclang-11-dev libclang-cpp11 graphviz + default: libclang-18-dev libclang-cpp18 graphviz generate_zip: description: 'Flag to indicate whether a ZIP output should be created.' required: false From 7386318d8f0ce6762b34227f080cf6335c2d6011 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 23 Jan 2025 18:25:04 +0000 Subject: [PATCH 04/10] Coverage check Signed-off-by: Ubuntu --- .github/workflows/pr_checks.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 90a0a502..a389e10b 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -58,7 +58,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"', }, { @@ -69,7 +69,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"', }, { @@ -80,7 +80,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"', }, { @@ -91,7 +91,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -102,7 +102,7 @@ jobs: run-spelling-check: false, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', branch-coverage: 90, }, @@ -114,7 +114,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -125,7 +125,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -136,7 +136,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG', + build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -146,7 +146,7 @@ jobs: run-link-verifier: true, run-spelling-check: true, run-complexity: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -157,7 +157,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { @@ -168,7 +168,7 @@ jobs: run-spelling-check: true, run-complexity: false, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"', }, { @@ -179,7 +179,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', }, { repository: SigV4-for-AWS-IoT-embedded-sdk, @@ -188,7 +188,7 @@ jobs: run-complexity: true, run-spelling-check: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1', coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, ] From 6a12b4db6e52d01961cb87a257d251121fe8a452 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 05:28:02 +0000 Subject: [PATCH 05/10] Fix coverage check for backoffAlgorithm Signed-off-by: Ubuntu --- .github/workflows/pr_checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index a389e10b..86e37db7 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -59,7 +59,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"', }, { repository: coreHTTP, From 36c690e977bb834668bc521af557ac4b57aa984e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 07:04:49 +0000 Subject: [PATCH 06/10] Fix coverage-cop Signed-off-by: Ubuntu --- .github/workflows/pr_checks.yml | 2 +- coverage-cop/action.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 86e37db7..91b99c78 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -322,7 +322,7 @@ jobs: fi echo -e "::endgroup::" - lcov --rc lcov_branch_coverage=1 --list build/coverage.info + lcov --rc lcov_branch_coverage=1 --summary build/coverage.info - name: Test coverage cop action ${{matrix.inputs.repository}} if: matrix.inputs.run-complexity && ( success() || failure() ) diff --git a/coverage-cop/action.yml b/coverage-cop/action.yml index 19941f4b..d6d753df 100644 --- a/coverage-cop/action.yml +++ b/coverage-cop/action.yml @@ -46,9 +46,9 @@ runs: # TODO: The way it grabs the line/branch coverage is a little complicated # I'd like to see if this can be done simpler. echo -e " ${{ env.bashInfo }} Received LCov Report: ${{ inputs.coverage-file }} ${{ env.bashEnd}}" - lcov --list --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} - LINE_COVERAGE=$(lcov --list ${{ inputs.coverage-file }} | tail -n 1 | cut -d '|' -f 2 | sed -n "s/\([^%]*\)%.*/\1/p") - BRANCH_COVERAGE=$(lcov --rc lcov_branch_coverage=1 --list ${{ inputs.coverage-file }} | tail -n 1 | cut -d '|' -f 4 | sed -n "s/\([^%]*\)%.*/\1/p") + lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} + LINE_COVERAGE=$(lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} | grep -E line.*: | cut -d ':' -f 2 | cut -d '%' -f 1 | xargs) + BRANCH_COVERAGE=$(lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} | grep -E branches.*: | cut -d ':' -f 2 | cut -d '%' -f 1 | xargs) RESULT=0 # Check Line Coverage From b69edfcec4bb623c7628d86e0156c7a4c1591bfa Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 07:10:53 +0000 Subject: [PATCH 07/10] Fix coverage checks Signed-off-by: Ubuntu --- .github/workflows/pr_checks.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 91b99c78..ed651416 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -69,7 +69,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"', }, { repository: coreJSON, @@ -80,7 +79,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"', }, { repository: coreMQTT, @@ -91,7 +89,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: corePKCS11, @@ -102,7 +99,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', branch-coverage: 90, }, { @@ -114,7 +110,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: FreeRTOS-Cellular-Interface, @@ -125,7 +120,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: Device-Defender-for-AWS-IoT-embedded-sdk, @@ -136,7 +130,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: Device-Shadow-for-AWS-IoT-embedded-sdk, @@ -146,7 +139,6 @@ jobs: run-spelling-check: true, run-complexity: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: Fleet-Provisioning-for-AWS-IoT-embedded-sdk, @@ -157,7 +149,6 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, { repository: Jobs-for-AWS-IoT-embedded-sdk, @@ -168,7 +159,6 @@ jobs: run-complexity: false, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"', }, { repository: ota-for-AWS-IoT-embedded-sdk, @@ -188,7 +178,6 @@ jobs: run-spelling-check: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1', - coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"', }, ] steps: @@ -314,12 +303,8 @@ jobs: echo -e "::endgroup::" echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - if [[ "${{ matrix.inputs.coverage-skips }}" != "" ]]; then - declare -a EXCLUDE=( ${{ matrix.inputs.coverage-skips }} ) - echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info - else - lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info - fi + lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info + echo -e "::endgroup::" lcov --rc lcov_branch_coverage=1 --summary build/coverage.info From 0e27dfafa06c1a56639ccbb54145103bc76aef18 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 07:51:04 +0000 Subject: [PATCH 08/10] Fix more failed checks Signed-off-by: Ubuntu --- .github/workflows/test.yml | 11 +++++------ clang-formatting/action.yml | 1 + link-verifier/badUrls.md | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f812b39..c1ff742a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,7 +163,7 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_CLONE_SUBMODULES=ON \ - -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG' + -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG' make -C build/ all exitStatus=$? echo -e "::endgroup::" @@ -185,11 +185,10 @@ jobs: echo -e "::endgroup::" echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - declare -a EXCLUDE=("\*test/\*" "\*CMakeCCompilerId\*" "\*mocks\*") - echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info + lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info echo -e "::endgroup::" - lcov --rc lcov_branch_coverage=1 --list build/coverage.info + lcov --rc lcov_branch_coverage=1 --summary build/coverage.info echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}" - name: Test Coverage Cop Action @@ -219,7 +218,7 @@ jobs: lcov --base-directory build/ --directory build/ --add-tracefile build/base_coverage.info --add-tracefile build/second_coverage.info --output-file build/coverage.info --rc lcov_branch_coverage=1 echo -e "::endgroup::" - lcov --rc lcov_branch_coverage=1 --list build/coverage.info + lcov --rc lcov_branch_coverage=1 --summary build/coverage.info set -e echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}" @@ -288,7 +287,7 @@ jobs: with: path: ./ exclude-dirs: complexity, formatting - exclude-urls: https://dummy-url.com/ota.bin, https://dummy-url.com/ota.com, https://dummy-url-three.com/ota.bin, https://github.com/FreeRTOS/A-Repo-That-Wins-You-The-Lottery + exclude-urls: https://dummy-url.com/ota.bin, https://dummy-url.com/ota.com, https://dummy-url-three.com/ota.bin, https://github.com/FreeRTOS/A-Repo-That-Wins-You-The-Lottery, https://www.gnu.org/software/complexity/manual/complexity.html - env: stepName: "Functional | Failure | Link Does Not Exist" diff --git a/clang-formatting/action.yml b/clang-formatting/action.yml index a299d93b..be1fa52f 100644 --- a/clang-formatting/action.yml +++ b/clang-formatting/action.yml @@ -133,6 +133,7 @@ runs: name: formattingChanges path: ${{ inputs.path }}/formattingChanges.patch retention-days: 7 + overwrite: true - env: bashPass: \033[32;1m diff --git a/link-verifier/badUrls.md b/link-verifier/badUrls.md index a6ee5122..95deda47 100644 --- a/link-verifier/badUrls.md +++ b/link-verifier/badUrls.md @@ -1,3 +1,4 @@ https://dummy-url.com/ota.bin https://dummy-url.com/ota.com https://dummy-url-three.com/ota.bin +https://www.gnu.org/software/complexity/manual/complexity.html From 9c4558acf568787e85abbeb2353bf45fe4083ff4 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 08:09:59 +0000 Subject: [PATCH 09/10] Fix more checks Signed-off-by: Ubuntu --- .github/workflows/formattingTests.yml | 1 - .github/workflows/test.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/formattingTests.yml b/.github/workflows/formattingTests.yml index e63b575e..85285bfc 100644 --- a/.github/workflows/formattingTests.yml +++ b/.github/workflows/formattingTests.yml @@ -316,7 +316,6 @@ jobs: uses: ./clang-formatting with: path: clang-formatting/goodFiles - exclude-dirs: ",,," exclude-files: "errorFileInDirectory.h, formatErrorTest.h, errorFileInDirectory.c, formatErrorTest.c" - name: Remove Error Files at Top Directory diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1ff742a..ebca6716 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,7 +163,7 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_CLONE_SUBMODULES=ON \ - -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG' + -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG' make -C build/ all exitStatus=$? echo -e "::endgroup::" @@ -214,7 +214,7 @@ jobs: echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" declare -a EXCLUDE=("\*test/\*") set +e - lcov --directory build/ --base-directory build/ --initial --capture --rc lcov_branch_coverage=1 --output-file=build/base_coverage.info + lcov --directory build/ --base-directory build/ --initial --capture --rc lcov_branch_coverage=1 --exclude "*CMakeCCompilerId.c" --output-file=build/base_coverage.info lcov --base-directory build/ --directory build/ --add-tracefile build/base_coverage.info --add-tracefile build/second_coverage.info --output-file build/coverage.info --rc lcov_branch_coverage=1 echo -e "::endgroup::" From 535ef9a893424f8df2bdf7fdf131b641edbf57ab Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 24 Jan 2025 09:15:40 +0000 Subject: [PATCH 10/10] Fix more checks Signed-off-by: Ubuntu --- .github/workflows/pr_checks.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index ed651416..544940a1 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -69,6 +69,7 @@ jobs: run-complexity: true, run-doxygen: true, build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG', + coverage-skips: "*3rdparty*", }, { repository: coreJSON, @@ -88,7 +89,7 @@ jobs: run-spelling-check: true, run-complexity: true, run-doxygen: true, - build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG', + build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG', }, { repository: corePKCS11, @@ -208,7 +209,7 @@ jobs: with: path: repo/${{ matrix.inputs.repository }} exclude-dirs: complexity, formatting - exclude-urls: https://dummy-url.com/ota.bin, https://s3.region.amazonaws.com/joe-ota + exclude-urls: https://dummy-url.com/ota.bin, https://s3.region.amazonaws.com/joe-ota, https://www.gnu.org/software/complexity/manual/complexity.html, https://www.u-blox.com/en/product/sara-r4-series - name: "Complexity Check: ${{ matrix.inputs.repository }}" if: matrix.inputs.run-complexity && ( success() || failure() ) @@ -303,7 +304,12 @@ jobs: echo -e "::endgroup::" echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info + if [[ "${{ matrix.inputs.coverage-skips }}" != "" ]]; then + declare -a EXCLUDE=( ${{ matrix.inputs.coverage-skips }} ) + echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info + else + lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info + fi echo -e "::endgroup::"