From e55b7f2b3a6936dae7ea159e304ec75bd273d9d9 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Sat, 13 Jun 2026 21:47:19 +0200 Subject: [PATCH] Do CI when pushing to main - Builds firmware - Saves it as artifact --- .gitea/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..c58b76b --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,37 @@ +# .gitea/workflows/build.yml +name: Firmware compile + +on: + push: + branches: [ "main", "ci" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: uoohyo/stm32-cmake:latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build the firmware + run: | + if [ -f *.ioc ]; then + echo "Generating code from CubeMX .ioc file…" + STM32CubeMX -q *.ioc + fi + echo "Starting the build…" + make -j$(nproc) + + - name: Upload firmware binaries + uses: actions/upload-artifact@v4 + with: + name: firmware-binaries + path: | + *.bin + *.hex + *.elf