Skip to content

Clang-Format and CI-CD Update #794

Clang-Format and CI-CD Update

Clang-Format and CI-CD Update #794

Workflow file for this run

name: CI Checks
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
workflow_dispatch:
jobs:
unittest:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v3
- name: Build
run: |
sudo apt-get install -y lcov
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
make -C build/ all
- name: Run CTests
run: ctest --test-dir build -E system --output-on-failure
- name: Run Coverage
run: |
make -C build/ coverage
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*3rdparty\*")
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@CI-CD-Overhaul
with:
coverage-file: ./build/coverage.info
complexity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check complexity
uses: FreeRTOS/CI-CD-Github-Actions/complexity@CI-CD-Overhaul
with:
path: ./
doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run doxygen build
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@CI-CD-Overhaul
with:
path: ./
spell-check:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v3
- name: Run spellings check
uses: FreeRTOS/CI-CD-Github-Actions/rust-spell-check@main
with:
path: ./
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
uses: FreeRTOS/CI-CD-Github-Actions/formatting@CI-CD-Overhaul
with:
path: ./
ssot-check:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
with:
path: current
- name: Checkout coreMQTT
uses: actions/checkout@v3
with:
ref: main
repository: Skptak/coreMQTT
path: ssot
- name: Check transport_interface.h
run: |
SSOT_FILE="ssot/source/interface/transport_interface.h"
CURRENT_FILE="current/source/interface/transport_interface.h"
diff <(tail -n +3 $SSOT_FILE) <(tail -n +3 $CURRENT_FILE)
if [ "$?" -ne "0" ]; then
echo "transport_interface.h differs from coreMQTT."
exit 1
else
exit 0
fi
git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout awslabs/git-secrets
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@v3
with:
submodules: "recursive"
- name: Install Python3
uses: actions/setup-python@v3
with:
python-version: "3.11.0"
- name: Measure sizes
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@CI-CD-Overhaul
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@CI-CD-Overhaul
with:
path: ./
proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_64-core
steps:
- name: Set up CBMC runner
uses: FreeRTOS/CI-CD-Github-Actions/set_up_cbmc_runner@CI-CD-Overhaul
with:
kissat_tag: latest
cbmc_version: "5.73.0"
- run: |
git submodule update --init --recursive --checkout
sudo apt-get update
sudo apt-get install --yes --no-install-recommends gcc-multilib build-essential
- name: Run CBMC
uses: FreeRTOS/CI-CD-Github-Actions/run_cbmc@CI-CD-Overhaul
with:
proofs_dir: test/cbmc/proofs