Skip to content

Commit b9b343d

Browse files
authored
Fix CI checks for Ubuntu 24.04 (#117)
ubuntu-latest is now Ubuntu 24.04 which requires some CI-CD fixes. Signed-off-by: Gaurav Aggarwal <[email protected]>
1 parent 3d7325e commit b9b343d

File tree

10 files changed

+32
-42
lines changed

10 files changed

+32
-42
lines changed

.github/workflows/formattingTests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ jobs:
316316
uses: ./clang-formatting
317317
with:
318318
path: clang-formatting/goodFiles
319-
exclude-dirs: ",,,"
320319
exclude-files: "errorFileInDirectory.h, formatErrorTest.h, errorFileInDirectory.c, formatErrorTest.c"
321320

322321
- name: Remove Error Files at Top Directory

.github/workflows/pr_checks.yml

+16-26
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ jobs:
5858
run-spelling-check: true,
5959
run-complexity: true,
6060
run-doxygen: true,
61-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror',
62-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
61+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
6362
},
6463
{
6564
repository: coreHTTP,
@@ -69,8 +68,8 @@ jobs:
6968
run-spelling-check: true,
7069
run-complexity: true,
7170
run-doxygen: true,
72-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
73-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
71+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG',
72+
coverage-skips: "*3rdparty*",
7473
},
7574
{
7675
repository: coreJSON,
@@ -80,8 +79,7 @@ jobs:
8079
run-spelling-check: true,
8180
run-complexity: true,
8281
run-doxygen: true,
83-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror',
84-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"',
82+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
8583
},
8684
{
8785
repository: coreMQTT,
@@ -92,7 +90,6 @@ jobs:
9290
run-complexity: true,
9391
run-doxygen: true,
9492
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG',
95-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
9693
},
9794
{
9895
repository: corePKCS11,
@@ -102,8 +99,7 @@ jobs:
10299
run-spelling-check: false,
103100
run-complexity: true,
104101
run-doxygen: true,
105-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
106-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
102+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG',
107103
branch-coverage: 90,
108104
},
109105
{
@@ -114,8 +110,7 @@ jobs:
114110
run-spelling-check: true,
115111
run-complexity: true,
116112
run-doxygen: true,
117-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1',
118-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
113+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1',
119114
},
120115
{
121116
repository: FreeRTOS-Cellular-Interface,
@@ -125,8 +120,7 @@ jobs:
125120
run-spelling-check: true,
126121
run-complexity: true,
127122
run-doxygen: true,
128-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG',
129-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
123+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
130124
},
131125
{
132126
repository: Device-Defender-for-AWS-IoT-embedded-sdk,
@@ -136,8 +130,7 @@ jobs:
136130
run-spelling-check: true,
137131
run-complexity: true,
138132
run-doxygen: true,
139-
build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG',
140-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
133+
build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
141134
},
142135
{
143136
repository: Device-Shadow-for-AWS-IoT-embedded-sdk,
@@ -146,8 +139,7 @@ jobs:
146139
run-link-verifier: true,
147140
run-spelling-check: true,
148141
run-complexity: true,
149-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG',
150-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
142+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
151143
},
152144
{
153145
repository: Fleet-Provisioning-for-AWS-IoT-embedded-sdk,
@@ -157,8 +149,7 @@ jobs:
157149
run-spelling-check: true,
158150
run-complexity: true,
159151
run-doxygen: true,
160-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG',
161-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
152+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG',
162153
},
163154
{
164155
repository: Jobs-for-AWS-IoT-embedded-sdk,
@@ -168,8 +159,7 @@ jobs:
168159
run-spelling-check: true,
169160
run-complexity: false,
170161
run-doxygen: true,
171-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror',
172-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*"',
162+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -Werror',
173163
},
174164
{
175165
repository: ota-for-AWS-IoT-embedded-sdk,
@@ -179,7 +169,7 @@ jobs:
179169
run-spelling-check: true,
180170
run-complexity: true,
181171
run-doxygen: true,
182-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
172+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG',
183173
},
184174
{
185175
repository: SigV4-for-AWS-IoT-embedded-sdk,
@@ -188,8 +178,7 @@ jobs:
188178
run-complexity: true,
189179
run-spelling-check: true,
190180
run-doxygen: true,
191-
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1',
192-
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
181+
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1',
193182
},
194183
]
195184
steps:
@@ -220,7 +209,7 @@ jobs:
220209
with:
221210
path: repo/${{ matrix.inputs.repository }}
222211
exclude-dirs: complexity, formatting
223-
exclude-urls: https://dummy-url.com/ota.bin, https://s3.region.amazonaws.com/joe-ota
212+
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
224213

225214
- name: "Complexity Check: ${{ matrix.inputs.repository }}"
226215
if: matrix.inputs.run-complexity && ( success() || failure() )
@@ -321,9 +310,10 @@ jobs:
321310
else
322311
lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
323312
fi
313+
324314
echo -e "::endgroup::"
325315
326-
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
316+
lcov --rc lcov_branch_coverage=1 --summary build/coverage.info
327317
328318
- name: Test coverage cop action ${{matrix.inputs.repository}}
329319
if: matrix.inputs.run-complexity && ( success() || failure() )

.github/workflows/test.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,10 @@ jobs:
185185
echo -e "::endgroup::"
186186
187187
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
188-
declare -a EXCLUDE=("\*test/\*" "\*CMakeCCompilerId\*" "\*mocks\*")
189-
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info
188+
lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info
190189
echo -e "::endgroup::"
191190
192-
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
191+
lcov --rc lcov_branch_coverage=1 --summary build/coverage.info
193192
echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
194193
195194
- name: Test Coverage Cop Action
@@ -215,11 +214,11 @@ jobs:
215214
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
216215
declare -a EXCLUDE=("\*test/\*")
217216
set +e
218-
lcov --directory build/ --base-directory build/ --initial --capture --rc lcov_branch_coverage=1 --output-file=build/base_coverage.info
217+
lcov --directory build/ --base-directory build/ --initial --capture --rc lcov_branch_coverage=1 --exclude "*CMakeCCompilerId.c" --output-file=build/base_coverage.info
219218
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
220219
echo -e "::endgroup::"
221220
222-
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
221+
lcov --rc lcov_branch_coverage=1 --summary build/coverage.info
223222
set -e
224223
echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
225224
@@ -288,7 +287,7 @@ jobs:
288287
with:
289288
path: ./
290289
exclude-dirs: complexity, formatting
291-
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
290+
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
292291

293292
- env:
294293
stepName: "Functional | Failure | Link Does Not Exist"

clang-formatting/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,12 @@ runs:
128128
- name: Upload Formatting Git Patch
129129
if: failure() && ( steps.action-formatting-check.outcome == 'failure' )
130130
id: upload-formatting-patch
131-
uses: actions/upload-artifact@v3
131+
uses: actions/upload-artifact@v4
132132
with:
133133
name: formattingChanges
134134
path: ${{ inputs.path }}/formattingChanges.patch
135135
retention-days: 7
136+
overwrite: true
136137

137138
- env:
138139
bashPass: \033[32;1m

coverage-cop/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ runs:
4646
# TODO: The way it grabs the line/branch coverage is a little complicated
4747
# I'd like to see if this can be done simpler.
4848
echo -e " ${{ env.bashInfo }} Received LCov Report: ${{ inputs.coverage-file }} ${{ env.bashEnd}}"
49-
lcov --list --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }}
50-
LINE_COVERAGE=$(lcov --list ${{ inputs.coverage-file }} | tail -n 1 | cut -d '|' -f 2 | sed -n "s/\([^%]*\)%.*/\1/p")
51-
BRANCH_COVERAGE=$(lcov --rc lcov_branch_coverage=1 --list ${{ inputs.coverage-file }} | tail -n 1 | cut -d '|' -f 4 | sed -n "s/\([^%]*\)%.*/\1/p")
49+
lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }}
50+
LINE_COVERAGE=$(lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} | grep -E line.*: | cut -d ':' -f 2 | cut -d '%' -f 1 | xargs)
51+
BRANCH_COVERAGE=$(lcov --summary --rc lcov_branch_coverage=1 ${{ inputs.coverage-file }} | grep -E branches.*: | cut -d ':' -f 2 | cut -d '%' -f 1 | xargs)
5252
RESULT=0
5353
5454
# Check Line Coverage
@@ -80,7 +80,7 @@ runs:
8080
- name: Upload Failed Codecov HTML Report
8181
if: failure() && ( steps.action-check-line-and-branch-coverage.outcome == 'failure' )
8282
id: upload-codecov-report
83-
uses: actions/upload-artifact@v3
83+
uses: actions/upload-artifact@v4
8484
with:
8585
name: CodecovHTMLReport
8686
path: CodecovHTMLReport.zip

doxygen-generation/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ inputs:
2626
doxygen_dependencies:
2727
description: 'Space-separated dependencies for doxygen.'
2828
required: false
29-
default: libclang-11-dev libclang-cpp11 graphviz
29+
default: libclang-18-dev libclang-cpp18 graphviz
3030

3131
runs:
3232
using: "composite"

doxygen/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inputs:
1616
doxygen_dependencies:
1717
description: 'Space-separated dependencies for doxygen.'
1818
required: false
19-
default: libclang-11-dev libclang-cpp11 graphviz
19+
default: libclang-18-dev libclang-cpp18 graphviz
2020
generate_zip:
2121
description: 'Flag to indicate whether a ZIP output should be created.'
2222
required: false

formatting/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ runs:
128128
- name: Upload Formatting Git Patch
129129
if: failure() && ( steps.action-formatting-check.outcome == 'failure' )
130130
id: upload-formatting-patch
131-
uses: actions/upload-artifact@v3
131+
uses: actions/upload-artifact@v4
132132
with:
133133
name: formattingChanges
134134
path: ${{ inputs.path }}/formattingChanges.patch

link-verifier/badUrls.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
https://dummy-url.com/ota.bin
22
https://dummy-url.com/ota.com
33
https://dummy-url-three.com/ota.bin
4+
https://www.gnu.org/software/complexity/manual/complexity.html

run_cbmc/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ runs:
9494
stepName: Upload zip artifact of CBMC proof results to GitHub Actions
9595
name: ${{ env.stepName }}
9696
if: ${{ env.REPO_VISIBILITY == 'public' }}
97-
uses: actions/upload-artifact@v3
97+
uses: actions/upload-artifact@v4
9898
with:
9999
name: ${{ steps.artifact.outputs.name }}
100100
path: ${{ steps.artifact.outputs.name }}.zip

0 commit comments

Comments
 (0)