Skip to content

Commit

Permalink
Slight format tweak for the ci.yml file to have newlines between jobs.
Browse files Browse the repository at this point in the history
Mark the code blocks as shell in the README.md.
Also mark that the GNU complexity score for this repo is capped at 10 now.
  • Loading branch information
Skptak committed Dec 14, 2023
1 parent e3dc261 commit 78a2892
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,41 @@ on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build-check:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v3

- name: Build Library in Debug mode
run: |
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-O0 -Wall -Wextra -Werror -Wformat -Wformat-security -Warray-bounds'
make -C build/ coverity_analysis -j8
- name: Build Library in Release mode
run: |
rm -rf ./build
cmake -S test -B build/ -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DNDEBUG -Wformat -Wformat-security -Warray-bounds'
make -C build/ coverity_analysis -j8
build-code-example:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v3

- name: Build Code Example used in Doxygen
run: |
cmake -S test -B Build -DBUILD_CODE_EXAMPLE=ON
make -C Build code_example_posix -j8
unittest-with-sanitizer:
runs-on: ubuntu-latest
steps:
Expand All @@ -58,16 +64,19 @@ jobs:
-DBUILD_UNIT_TESTS=ON \
-DCMAKE_C_FLAGS="${CFLAGS}"
make -C build all -j8
- name: Run unit tests with sanitizer
run: |
cd build
ctest -E system --output-on-failure
cd ..
unittest-for-coverage:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v3

- name: Build
run: |
sudo apt-get install -y lcov sed
Expand All @@ -78,21 +87,25 @@ jobs:
-DBUILD_UNIT_TESTS=ON \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -Wno-error=pedantic -Wno-variadic-macros -DLOGGING_LEVEL_DEBUG=1'
make -C build/ all
- name: Test
run: |
cd build/
ctest -E system --output-on-failure
cd ..
- name: Run Coverage
run: |
make -C build/ coverage
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*")
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
- name: Check Coverage
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main
with:
coverage-file: ./build/coverage.info

complexity:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -170,6 +183,7 @@ jobs:
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
with:
path: ./

memory_statistics:
runs-on: ubuntu-latest
steps:
Expand All @@ -183,6 +197,7 @@ jobs:
with:
config: .github/memory_statistics_config.json
check_against: docs/doxygen/include/size_table.md

proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_16-core
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ servers.
This library has gone through code quality checks including verification that no
function has a
[GNU Complexity](https://www.gnu.org/software/complexity/manual/complexity.html)
score over 8, and checks against deviations from mandatory rules in the
score over 10, and checks against deviations from mandatory rules in the
[MISRA coding standard](https://www.misra.org.uk). Deviations from the MISRA
C:2012 guidelines are documented under [MISRA Deviations](MISRA.md). This
library has also undergone both static code analysis from
Expand Down Expand Up @@ -47,20 +47,20 @@ in dependent components.

To clone using HTTPS:

```
```sh
git clone https://github.com/FreeRTOS/coreSNTP.git --recurse-submodules
```

Using SSH:

```
```sh
git clone [email protected]:FreeRTOS/coreSNTP.git --recurse-submodules
```

If you have downloaded the repo without using the `--recurse-submodules`
argument, you need to run:

```
```sh
git submodule update --init --recursive
```

Expand Down Expand Up @@ -135,7 +135,7 @@ The Doxygen references were created using Doxygen version 1.9.2. To generate the
Doxygen pages, please run the following command from the root of this
repository:

```shell
```sh
doxygen docs/doxygen/config.doxyfile
```

Expand Down

0 comments on commit 78a2892

Please sign in to comment.