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 CI checks for Ubuntu 24.04 #117

Merged
merged 10 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .github/workflows/formattingTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 16 additions & 26 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
},
{
repository: coreHTTP,
Expand All @@ -69,8 +68,8 @@ jobs:
run-spelling-check: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG',
coverage-skips: "*3rdparty*",
},
{
repository: coreJSON,
Expand All @@ -80,8 +79,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
},
{
repository: coreMQTT,
Expand All @@ -92,7 +90,6 @@ jobs:
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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
},
{
repository: corePKCS11,
Expand All @@ -102,8 +99,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG',
branch-coverage: 90,
},
{
Expand All @@ -114,8 +110,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1',
},
{
repository: FreeRTOS-Cellular-Interface,
Expand All @@ -125,8 +120,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
},
{
repository: Device-Defender-for-AWS-IoT-embedded-sdk,
Expand All @@ -136,8 +130,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
},
{
repository: Device-Shadow-for-AWS-IoT-embedded-sdk,
Expand All @@ -146,8 +139,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
},
{
repository: Fleet-Provisioning-for-AWS-IoT-embedded-sdk,
Expand All @@ -157,8 +149,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
},
{
repository: Jobs-for-AWS-IoT-embedded-sdk,
Expand All @@ -168,8 +159,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
},
{
repository: ota-for-AWS-IoT-embedded-sdk,
Expand All @@ -179,7 +169,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,
Expand All @@ -188,8 +178,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',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1',
},
]
steps:
Expand Down Expand Up @@ -220,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() )
Expand Down Expand Up @@ -321,9 +310,10 @@ jobs:
else
lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
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() )
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -215,11 +214,11 @@ 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::"

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 }}"

Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion clang-formatting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,12 @@ 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
retention-days: 7
overwrite: true

- env:
bashPass: \033[32;1m
Expand Down
8 changes: 4 additions & 4 deletions coverage-cop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doxygen-generation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion doxygen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion formatting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions link-verifier/badUrls.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion run_cbmc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading