diff --git a/.github/.cSpellWords.txt b/.github/.cSpellWords.txt new file mode 100644 index 000000000..158bf07f9 --- /dev/null +++ b/.github/.cSpellWords.txt @@ -0,0 +1,8 @@ +CMOCK +CMock +Cmock +Coverity +MISRA +Misra +coverity +misra diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d87bda4e..3f504e1d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Clone This Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check warnings run: | git submodule update --init --recursive --checkout --depth 1 @@ -26,20 +26,20 @@ jobs: complexity: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup run: sudo apt-get install complexity - name: Complexity - uses: FreeRTOS/CI-CD-Github-Actions/complexity@main + uses: FreeRTOS/CI-CD-Github-Actions/complexity@v2 with: path: ./ - horrid_threshold: 10 + horrid_threshold: 14 unittest: runs-on: ubuntu-latest steps: - name: Clone This Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build run: | git submodule update --init --recursive --checkout --depth 1 @@ -55,7 +55,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Clone This Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 + - name: Generate Build Files run: | git submodule update --init --recursive --checkout --depth 1 @@ -63,55 +64,43 @@ jobs: cmake -S test -B build \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG' + - name: Run Coverage run: | cmake --build build/ --target coverage + - 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 line-coverage-min: 100 branch-coverage-min: 100 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: Checkout Parent Repo - uses: actions/checkout@v2 - with: - ref: main - repository: aws/aws-iot-device-sdk-embedded-C - name: Clone This Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 + - name: Run spellings check + uses: FreeRTOS/CI-CD-GitHub-Actions/rust-spell-check@v2 with: - path: tmp - - name: Install spell - run: | - sudo apt-get install spell - sudo apt-get install util-linux - - name: Check spelling - run: | - PATH=$PATH:$PWD/tools/spell - find-unknown-comment-words --directory tmp/ --lexicon tmp/tools/lexicon.txt - if [ $? -ne "0" ]; then - exit 1 - fi + path: ./ formatting: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest 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: ./ exclude-dirs: docs,.github @@ -119,11 +108,11 @@ jobs: git-secrets: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Checkout awslabs/git-secrets - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: awslabs/git-secrets ref: master @@ -138,19 +127,53 @@ jobs: memory_statistics: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Clone submodules run: git submodule update --init --recursive --checkout --depth 1 - 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 + + 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: - config: .github/memory_statistics_config.json - check_against: docs/doxygen/include/size_table.md + 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@v2 + with: + path: ./ + fail-on-incorrect-version: true + proof_ci: + if: ${{ github.event.pull_request }} runs-on: cbmc_ubuntu-latest_16-core steps: - name: Set up CBMC runner diff --git a/cspell.config.yaml b/cspell.config.yaml new file mode 100644 index 000000000..e7d8a56fd --- /dev/null +++ b/cspell.config.yaml @@ -0,0 +1,22 @@ +--- +$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json +version: '0.2' +# Allows things like stringLength +allowCompoundWords: true +useGitignore: true +# Could split this up? And do a dictionary for each repo? +# 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: + - 'node_modules' + - '.cSpellWords.txt' + - 'dependency' + - 'docs' + - 'ThirdParty' +