Files
nRF52840_PTT/.gitea/workflows/ci.yml
Krzysztof Cieślik ee7e5544bb
Some checks failed
CI / Build firmware (push) Successful in 37s
CI / Check formatting (push) Successful in 14s
CI / Static analysis (push) Failing after 12s
CI / Build documentation (push) Failing after 13s
Fix CI: install tools natively instead of using Docker-in-Docker
Volume mounts with -v $PWD:/src fail when the runner itself runs
inside a container (the path exists in the runner container but not
on the Docker daemon host). Switch all four jobs to native apt-get
installs of the same packages that are in the Dockerfile. The
container-based just recipes remain unchanged for local use.
2026-05-21 23:12:14 +02:00

83 lines
2.0 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build firmware
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install toolchain
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \
cmake ninja-build
- name: Compile firmware
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel . && ninja -C build
- name: Print size
run: arm-none-eabi-size build/firmware
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends clang-format
- name: clang-format check
run: |
find src include -name '*.c' -o -name '*.h' | \
xargs clang-format --dry-run --Werror --style=file:.clang-format
lint:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends cppcheck
- name: cppcheck
run: |
cppcheck --error-exitcode=1 \
--enable=warning,style,performance,portability \
--suppress=missingInclude \
--inline-suppr \
--std=c11 \
-I include \
src/
docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends doxygen
- name: Doxygen
run: |
doxygen Doxyfile 2>&1 | tee /tmp/doxy.log
! grep -q 'warning:' /tmp/doxy.log