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 #162

Merged
merged 10 commits into from
Sep 5, 2023
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
28 changes: 28 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CBMC
CBOR
CMOCK
CMock
Cmock
Coverity
DCMOCK
DNDEBUG
DUNITY
Doesnt
LLHTTP
MISRA
MQTT
Misra
Wunused
abcdefghijk
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopq
cbmc
cbor
cmock
coverity
ctest
lcov
llhttp
lmnopqrstuvw
misra
sinclude
utest
82 changes: 61 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
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 @@ -21,11 +21,10 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
make -C build/ all
- name: Test
run: |
cd build/
ctest -E system --output-on-failure
cd ..

- name: Run CTests
run: ctest --test-dir build -E system --output-on-failure

- name: Run Coverage
run: |
make -C build/ coverage
Expand All @@ -35,49 +34,54 @@ jobs:
- name: Check Coverage
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main
with:
path: ./build/coverage.info
coverage-file: ./build/coverage.info

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-20.04
Skptak marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check formatting
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
path: ./

ssot-check:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: current
- name: Checkout coreMQTT
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: main
repository: FreeRTOS/coreMQTT
Expand All @@ -93,12 +97,13 @@ jobs:
else
exit 0
fi

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
Expand All @@ -109,22 +114,57 @@ jobs:
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-latest
steps:
- uses: actions/checkout@v3
- name: Check Links
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main
with:
path: ./

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

# At time of writing the gitmodules are set not to pull
# Even when using fetch submodules. Need to run this command
# To force it to grab them.
- name: Perform Recursive Clone
shell: bash
run: git submodule update --checkout --init --recursive

- name: Run manifest verifier
uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main
with:
path: ./
fail-on-incorrect-version: true

proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_64-core
steps:
- name: Set up CBMC runner
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: coreHTTP
Expand Down
2 changes: 1 addition & 1 deletion MISRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ _Ref 21.13.1_
- MISRA Rule 21.13 flags any value passed into a ctype.h function that isn't cast
as an unsigned char. Thorough testing by use of our CBMC proofs shows that adding
the cast to ( unsigned char ) inside of the toupper() call has potential to lead
to errors. Due to this we supress this warning for our use case.
to errors. Due to this we suppress this warning for our use case.
Loading