diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..f8adaa5 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build Firmware + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build: + name: Build stm32-teslacharger + runs-on: fedora + + steps: + - name: Checkout with submodules + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Build libopencm3 + run: make -C libopencm3 -j$(nproc) + + - name: Build firmware + run: make -j$(nproc) + + - name: Show binary size + run: | + arm-none-eabi-size stm32_charger.elf + ls -lh stm32_charger.bin + + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: stm32-teslacharger-${{ github.sha }} + path: stm32_charger.bin + retention-days: 30