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

Merged
merged 10 commits into from
Sep 5, 2023
26 changes: 26 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CBMC
CBOR
CMOCK
CMock
Cmock
Coverity
DNDEBUG
DUNITY
EFFF
MISRA
MQTT
Misra
Wunused
cbmc
cbor
cmock
coverity
ctest
dfcc
isystem
lcov
misra
searcht
sinclude
strn
utest
69 changes: 48 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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 sed
Expand All @@ -32,48 +32,48 @@ jobs:
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
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@v2
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
uses: FreeRTOS/CI-CD-Github-Actions/complexity@v2
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
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@v2
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
uses: FreeRTOS/CI-CD-GitHub-Actions/spellings@v2
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
uses: FreeRTOS/CI-CD-Github-Actions/formatting@v2
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
Expand All @@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build
run: |
mkdir -p override-include
Expand All @@ -102,19 +102,46 @@ jobs:
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
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@v2
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@v2
with:
path: ./

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@v2
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
2 changes: 1 addition & 1 deletion MISRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ _Ref 14.3.1_
- MISRA C-2012 Rule 14.3 False positive as the static analysis tool believes
i can never be larger than SIZE_MAX - HEX_ESCAPE_LENGTH. This can be proven as
a bug by setting i to be 18446744073709551615UL at initial assignment, then require
start != NULL before assigning the vaue of i to start. This creates a case
start != NULL before assigning the value of i to start. This creates a case
where i should be large enough to hit the else statement, but the tool still flags
this as invariant.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ int main()
size_t queryKeyLength = sizeof( queryKey ) - 1;
char * value;
size_t valueLength;

// Calling JSON_Validate() is not necessary if the document is guaranteed to be valid.
result = JSON_Validate( buffer, bufferLength );

if( result == JSONSuccess )
{
result = JSON_Search( buffer, bufferLength, queryKey, queryKeyLength,
&value, &valueLength );
}

if( result == JSONSuccess )
{
// The pointer "value" will point to a location in the "buffer".
Expand Down
27 changes: 27 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: '0.2'
# Allows things like stringLength
allowCompoundWords: true
Skptak marked this conversation as resolved.
Show resolved Hide resolved
useGitignore: true
languageSettings:
- allowCompoundWords: true
caseSensitive: false
enabled: true
languageId: c
locale: "*"
# Could split this up? And do a dictionary for each repo?
Skptak marked this conversation as resolved.
Show resolved Hide resolved
# But feel like if this isn't super slow
# That having just one single dictionary might be nicer?
dictionaryDefinitions:
- name: freertos-words
path: '.github/.cSpellWords.txt'
addWords: true
dictionaries:
- freertos-words
ignorePaths:
- '.cSpellWords.txt'
- 'dependency'
- 'docs'
- 'ThirdParty'
- 'History.txt'
128 changes: 0 additions & 128 deletions lexicon.txt

This file was deleted.