2021-11-30 14:51:24 +01:00

156 lines
3.9 KiB
YAML

name: CI Checks
on:
push:
branches: ["**"]
pull_request:
branches:
- main
- development
workflow_dispatch:
jobs:
compiler-warnings:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
with:
submodules: true
- name: Check warnings
run: |
cmake -S test -B build -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-Wall -Wextra -Werror -DLOG_LEVEL=LOG_LEVEL_DEBUG'
cmake --build build
complexity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
run: sudo apt-get install complexity
- name: Complexity
uses: FreeRTOS/CI-CD-Github-Actions/complexity@main
with:
path: ./
unittest:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: |
cmake -S test -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
- name: Test
run: |
cd build/
ctest -E system --output-on-failure
cd ..
coverage:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
with:
submodules: true
- name: Generate Build Files
run: |
sudo apt-get install -y lcov
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
with:
path: ./build/coverage.info
line-coverage-min: 100
branch-coverage-min: 100
doxygen:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run doxygen build
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
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
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
formatting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check formatting
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
path: ./
exclude-dirs: |
docs
.github
git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Checkout awslabs/git-secrets
uses: actions/checkout@v2
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
with:
submodules: 'recursive'
- name: Install Python3
uses: actions/setup-python@v2
with:
python-version: '3.7.10'
- 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