workflow integration - test
AVR Build / build (push) Has been cancelled

This commit is contained in:
Lukas
2026-04-29 11:04:12 +02:00
parent 4986f53d8a
commit d9f1e3e84c
2 changed files with 50 additions and 38 deletions
+50
View File
@@ -0,0 +1,50 @@
name: AVR Build
on:
push:
branches:
- dev
- live
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install AVR toolchain
run: |
apt-get update
apt-get install -y gcc-avr avr-libc binutils-avr make cppcheck
- name: Set build type from branch
id: vars
run: |
BRANCH="${GITHUB_REF_NAME}"
if [ "$BRANCH" = "dev" ]; then
echo "BUILD_TYPE=dev" >> $GITHUB_ENV
echo "PREFIX=DEV_ENO" >> $GITHUB_ENV
else
echo "BUILD_TYPE=live" >> $GITHUB_ENV
echo "PREFIX=ENO" >> $GITHUB_ENV
fi
echo "VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Code check
run: cppcheck --enable=all --error-exitcode=1 src/
- name: Build firmware
run: |
make BUILD_TYPE=$BUILD_TYPE PREFIX=$PREFIX VERSION=$VERSION
- name: Upload hex
uses: actions/upload-artifact@v4
with:
name: firmware-${{ env.BUILD_TYPE }}
path: build/**/*.hex