Skip to content

Protocols - Nanopb Integration #133

Protocols - Nanopb Integration

Protocols - Nanopb Integration #133

Workflow file for this run

---
name: ci
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
- "docs/**"
branches:
- master
pull_request:
types: [opened, reopened, synchronize]
branches:
- master
jobs:
lint:
name: static analysis
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v4
- name: setup python3
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: install clang formatter
run: |
python3 -m pip install -r requirements.txt
echo `clang-format --version`
- name: run clang formatter
run: find core -iname *.c -o -iname *.h | xargs clang-format -n -Werror --verbose
build:
name: build firmware
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
with:
submodules: recursive
- name: install arm-none-eabi-gcc
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '13.2.Rel1'
- name: setup python3
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: install openocd
run: |
sudo apt-get update -y
sudo apt-get install -y openocd
env:
DEBIAN_FRONTEND: noninteractive
- name: install python build dependancies
run: python3 -m pip install -r requirements.txt
- name: build
run: |
mkdir $GITHUB_WORKSPACE/build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j`nproc`
- name: binary size details
working-directory: build
run: make size
- name: binary object dump
working-directory: build
run: make objdump
- name: archive compile commands
uses: actions/upload-artifact@v4
with:
name: compile_commands.json
path: build/compile_commands.json
retention-days: 5
- name: archive binary
uses: actions/upload-artifact@v4
with:
name: raptor
# relative to $GITHUB_WORKSPACE
path: build/core/raptor.elf
retention-days: 5
test:
name: tests
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v4
- name: setup python3
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: install python build dependancies
run: python3 -m pip install -r requirements.txt
- name: build unittests
run: |
mkdir -p $GITHUB_WORKSPACE/tests/unittests/build
cmake -B tests/unittests/build -S tests/unittests -DCMAKE_BUILD_TYPE=Debug
make -C tests/unittests/build -j
- name: run unittests
run: make -C tests/unittests/build coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
fail_ci_if_error: true
file: tests/unittests/build/coverage.xml
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Upload coverage artefact
uses: actions/upload-artifact@v4
with:
name: coverage.xml
path: tests/unittests/build/coverage.xml
retention-days: 0