Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/executableMonitorTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- env:
stepName: Install Windows Build tools
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- env:
stepName: Install Windows Build tools
name: ${{ env.stepName }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/formattingTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uncrustify-formatting-success-cases:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- env:
stepName: "Functional | Success | Exclude Files and Dirs"
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
uncrustify-formatting-error-cases:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- env:
stepName: "Functional | Failure | Whitespace, CRLF, and Format Failure"
name: ${{ env.stepName }}
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
clang-formatting-success-cases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- env:
stepName: "Functional | Success | Exclude Files and Dirs"
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
clang-formatting-error-cases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- env:
stepName: "Functional | Failure | Whitespace, CRLF, and Format Failure"
name: ${{ env.stepName }}
Expand Down
164 changes: 84 additions & 80 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ jobs:
run-link-verifier: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
line-coverage: 100,
},
{
repository: coreHTTP,
Expand All @@ -66,7 +65,6 @@ jobs:
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*"',
line-coverage: 100,
},
{
repository: coreJSON,
Expand All @@ -77,7 +75,6 @@ jobs:
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\*"',
line-coverage: 100,
},
{
repository: coreMQTT,
Expand All @@ -88,7 +85,6 @@ jobs:
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\*"',
line-coverage: 100,
},
{
repository: corePKCS11,
Expand All @@ -97,9 +93,9 @@ jobs:
run-link-verifier: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTS=1 -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
build-flags: -DCMAKE_BUILD_TYPE=Debug -DSYSTEM_TESTS=0 -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
line-coverage: 95,
branch-coverage: 90,
},
{
repository: coreSNTP,
Expand All @@ -108,9 +104,8 @@ jobs:
run-link-verifier: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON -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='--coverage -Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
line-coverage: 100,
},
{
repository: FreeRTOS-Cellular-Interface,
Expand All @@ -121,7 +116,6 @@ jobs:
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\*"',
line-coverage: 99,
},
{
repository: Device-Defender-for-AWS-IoT-embedded-sdk,
Expand All @@ -132,73 +126,72 @@ jobs:
run-doxygen: true,
build-flags: -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
line-coverage: 100,
},
{
repository: Device-Shadow-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
line-coverage: 100,
},
{
repository: Fleet-Provisioning-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
line-coverage: 100,
},
{
repository: Jobs-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
line-coverage: 100,

},
{
repository: ota-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
line-coverage: 95,
},
{
repository: SigV4-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_UNIT_TESTS=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1',
coverage-skips: '"\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*"',
line-coverage: 100,
},
{
repository: Device-Shadow-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
},
{
repository: Fleet-Provisioning-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
},
{
repository: Jobs-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: 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\*"',
},
{
repository: ota-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-link-verifier: true,
run-complexity: true,
run-doxygen: true,
build-flags: -DCMAKE_BUILD_TYPE=Debug -DBUILD_CLONE_SUBMODULES=ON -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG',
},
{
repository: SigV4-for-AWS-IoT-embedded-sdk,
org: AWS,
branch: main,
run-complexity: 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\*"',
},
]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5.1.0

- name: Install Common Tools
- env:
stepName: Install Common Tools
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get -y update
sudo apt-get install -y lcov sed build-essential cmake
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"

- name: "Clone: ${{ matrix.inputs.repository }}"
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
repository: ${{ matrix.inputs.org }}/${{ matrix.inputs.repository }}
ref: ${{ matrix.inputs.branch }}
Expand Down Expand Up @@ -241,7 +234,7 @@ jobs:

- name: "Recursive Clone: ${{ matrix.inputs.repository }}"
if: success() || failure()
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
repository: ${{ matrix.inputs.org }}/${{ matrix.inputs.repository }}
ref: ${{ matrix.inputs.branch }}
Expand All @@ -256,17 +249,21 @@ jobs:
working-directory: repo/${{ matrix.inputs.repository }}_Recursive
run: git submodule update --checkout --init --recursive

- name: Build ${{matrix.inputs.repository}}
- env:
stepName: Build ${{matrix.inputs.repository}}
if: matrix.inputs.run-complexity && ( success() || failure() )
shell: bash
working-directory: repo/${{matrix.inputs.repository}}_Recursive
run: |
echo -e "::group:: Install lcov"
sudo apt-get install -y lcov
echo -e "::endgroup::"
Comment on lines -264 to -266
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just moved to the start of the action

cmake -S ./test -B build/ ${{ matrix.inputs.build-flags }}
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"

cmake -S ./test -B build/ ${{ matrix.inputs.build-flags }} -DUNITTEST=ON
make -C build/ all

echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"

- name: Test
if: matrix.inputs.run-complexity && ( success() || failure() )
shell: bash
Expand All @@ -289,27 +286,34 @@ jobs:
output: size_table_new.html
check_against: docs/doxygen/include/size_table.md

- name: Run Coverage ${{matrix.inputs.repository}}
- env:
stepName: Coverage ${{matrix.inputs.repository}}
if: matrix.inputs.run-complexity && ( success() || failure() )
shell: bash
working-directory: repo/${{matrix.inputs.repository}}_Recursive
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} Build ${{matrix.inputs.repository}} ${{ env.bashEnd }}"
make -C build/ coverage
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
echo -e "::endgroup::"

lcov --rc lcov_branch_coverage=1 --list build/coverage.info

- name: Test coverage cop action ${{matrix.inputs.repository}}
if: matrix.inputs.run-complexity && ( success() || failure() )
uses: ./coverage-cop
with:
coverage-file: repo/${{matrix.inputs.repository}}_Recursive/build/coverage.info
branch-coverage-min: 70
line-coverage-min: ${{ matrix.inputs.line-coverage }}
branch-coverage-min: ${{ matrix.inputs.branch_coverage }}

PR-uncrustify-checks:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -404,11 +408,11 @@ jobs:
]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5.1.0

- name: "Clone: ${{ matrix.inputs.repository }}"
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
repository: ${{ matrix.inputs.org }}/${{ matrix.inputs.repository }}
ref: ${{ matrix.inputs.branch }}
Expand Down
Loading