-
Notifications
You must be signed in to change notification settings - Fork 81
Fix gcc warnings in core_http_client.c. Update ci.yml. #101
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
base: main
Are you sure you want to change the base?
Changes from all commits
bb14738
e1e6fe8
f801321
8a8605e
467392a
4b1ff21
db5db98
4bbc37e
e5554f3
5488342
2c160c8
11f3e15
0f2a996
b33af43
1e91031
c995041
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,34 +8,68 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
unittest: | ||
unittests-sanitizer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone This Repo | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
- name: Build with Sanitizers | ||
run: | | ||
sudo apt-get install -y lcov | ||
cmake -S test -B build/ \ | ||
sudo apt-get install -y cmake lcov | ||
CFLAGS=" -O0 -Wall -Wextra" | ||
CFLAGS+=" -Werror -Wno-error=pedantic" | ||
paulbartell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CFLAGS+=" -D_FORTIFY_SOURCE=2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment about what this configuration and its value does? |
||
CFLAGS+=" -Wformat" | ||
CLFAGS+=" -Wformat-security" | ||
CFLAGS+=" -Warray-bounds" | ||
CFLAGS+=" -fsanitize=address,undefined" | ||
CFLAGS+=" -fsanitize=pointer-compare -fsanitize=pointer-subtract" | ||
CFLAGS+=" -fsanitize-recover=undefined" | ||
CFLAGS+=" -fsanitize-address-use-after-scope" | ||
CFLAGS+=" -fsanitize-undefined-trap-on-error" | ||
CFLAGS_=" -fstack-protector-all" | ||
cmake -S test -B build \ | ||
-G "Unix Makefiles" \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG' | ||
make -C build/ all | ||
- name: Test | ||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | ||
-DCMAKE_C_FLAGS="${CFLAGS}" | ||
make -C build all | ||
- name: Run Tests with Sanitizers | ||
run: | | ||
cd build/ | ||
cd build | ||
make coverage | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Minor) What's the purpose of building There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need the |
||
ctest -E system --output-on-failure | ||
cd .. | ||
- name: Run Coverage | ||
unittests-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone This Repo | ||
uses: actions/checkout@v2 | ||
- name: Build Tests for Coverage | ||
paulbartell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
make -C build/ coverage | ||
sudo apt-get install -y cmake lcov | ||
CFLAGS=" --coverage -O0 -Wall -Wextra" | ||
paulbartell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CFLAGS+=" -Werror -Wno-error=pedantic" | ||
CFLAGS+=" -DNDEBUG" | ||
paulbartell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmake -S test -B build_cov \ | ||
-G "Unix Makefiles" \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | ||
-DCMAKE_C_FLAGS="${CFLAGS}" | ||
make -C build_cov all | ||
- name: Run Tests for Coverage | ||
run: | | ||
cd build_cov | ||
make coverage | ||
ctest -E system --output-on-failure | ||
cd .. | ||
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*") | ||
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info | ||
lcov --rc lcov_branch_coverage=1 --list build/coverage.info | ||
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build_cov/coverage.info -o build_cov/coverage.info | ||
lcov --rc lcov_branch_coverage=1 --list build_cov/coverage.info | ||
- name: Check Coverage | ||
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main | ||
with: | ||
path: ./build/coverage.info | ||
path: ./build_cov/coverage.info | ||
complexity: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
Uh oh!
There was an error while loading. Please reload this page.