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

CI-CD Updates #87

Merged
merged 10 commits into from
Sep 5, 2023
68 changes: 68 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
AKIAIOSFODNN
Aizca
Ayjrf
Bgza
CBMC
CBOR
CMOCK
CMock
Cmock
Cnpb
Cnpbfi
Coverity
Cuiz
DCMOCK
DDISABLE
DNDEBUG
DUNITY
EKHX
Ecjuve
GGHU
HMDL
Hpxdr
Kcdef
Kced
Lkec
MISRA
MQTT
Misra
NGYY
Ndzbbpmap
OPAD
Pjiyp
Pnpyim
Qvpwa
Qwxh
Rajbw
SIGV
Sutzy
Thwgv
Uijcfxv
Vajgc
Vwng
Wunused
XLFAUQG
YYYYMMDD'T'HHMMSS'Z'
Zapv
cbmc
cbor
chjdsvchjdvhjcdhjsckhdsvchdks
cmock
coverity
ctest
gjfhjxgxghsgfdwfdfdfdffhfdhdhfhdfhd
lcov
misra
mlkzxncvlknlkanlkqwlerknlasdflkzxcnvklnlksqwerasdfklqwenrklnfsad
opad
pasdfghwsshasdfghjk
reall
sdgfdfgdshfgsjdhfdhfkhdkfhjdgfgdfgdfg
sdvfdvfhdvfhvdhfvdsfdsgfgdsjfgjdsfqwertyuio
sfdghfdfahgsdhfgjsgfjkgfsdgkdgfdjkgdggdjfsjkgjksgkj
sigv
sinclude
utest
wnqj
xchjsd
ymxchykldfghiwbdcjhjdddkkgddsdhshdkshdhsskgfkjgfggc
89 changes: 60 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build in Release Mode
run: |
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror'
make -C build/ all

unittest:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build
run: |
sudo apt-get install -y lcov
Expand All @@ -34,121 +37,149 @@ jobs:
-DBUILD_UNIT_TESTS=ON \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG -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:
path: ./build/coverage.info
coverage-file: ./build/coverage.info

build-with-default-config:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build
run: |
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DSIGV4_DO_NOT_USE_CUSTOM_CONFIG'
make -C build/ all

complexity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check complexity
uses: FreeRTOS/CI-CD-Github-Actions/complexity@main
with:
path: ./

doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Run doxygen build
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
with:
path: ./

spell-check:
runs-on: ubuntu-latest
steps:

- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run spellings check
uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
with:
path: ./

formatting:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check formatting
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
path: ./

git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout awslabs/git-secrets
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: awslabs/git-secrets
ref: master
path: git-secrets

- name: Install git-secrets
run: cd git-secrets && sudo make install && cd ..

- name: Run git-secrets
run: |
git-secrets --register-aws
git-secrets --scan

memory_statistics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'recursive'
submodules: "recursive"

- name: Install Python3
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.11.0'
python-version: "3.11.0"

- name: Measure sizes
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
with:
config: .github/memory_statistics_config.json
check_against: docs/doxygen/include/size_table.md
config: .github/memory_statistics_config.json
check_against: docs/doxygen/include/size_table.md

link-verifier:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Python for link verifier action
uses: actions/setup-python@v2
with:
python-version: '3.7.10'
- uses: actions/checkout@v3
- name: Check Links
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: FreeRTOS/CI-CD-GitHub-Actions/link-verifier@main
uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main

verify-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: Run manifest verifier
uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main
with:
path: ./
exclude-dirs: cmock,unity,cbmc
include-file-types: .c,.h,.dox
allowlist-file: ./.github/links_allowlist.txt
fail-on-incorrect-version: true

proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_32-core
steps:
- name: Set up CBMC runner
uses: FreeRTOS/CI-CD-Github-Actions/set_up_cbmc_runner@main

- name: Run CBMC
uses: FreeRTOS/CI-CD-Github-Actions/run_cbmc@main
with:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Format Pull Request Files

on:
issue_comment:
types: [created]

env:
bashPass: \033[32;1mPASSED -
bashInfo: \033[33;1mINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m

jobs:
Formatting:
name: Run Formatting Check
if: ${{ github.event.issue.pull_request }} &&
( ( github.event.comment.body == '/bot run uncrustify' ) ||
( github.event.comment.body == '/bot run formatting' ) )
runs-on: ubuntu-20.04
steps:
- name: Apply Formatting Fix
uses: FreeRTOS/CI-CD-Github-Actions/formatting-bot@main
id: check-formatting
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.commit_id }}
- name: Configure git identity
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Install ZIP tools
run: sudo apt-get install zip unzip
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.commit_id }}
path: SigV4-for-AWS-IoT-embedded-sdk
Expand Down
Loading