From f0cb51e3ea122ed7f22f4f4343fd31c11d5b0ca1 Mon Sep 17 00:00:00 2001 From: maxi322 Date: Mon, 9 Sep 2024 20:07:25 +0200 Subject: [PATCH] [CI] initial --- .github/workflows/build-project.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-project.yml diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml new file mode 100644 index 0000000..4de679e --- /dev/null +++ b/.github/workflows/build-project.yml @@ -0,0 +1,42 @@ +name: PlatformIO CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install PlatformIO Core + run: pip install --upgrade platformio + + - name: Build Firmware + run: | + cd firmware + pio run + mkdir bin + mv .pio/build/smif/firmware.bin bin/smif-ESP32-S3.bin + mv .pio/build/saola/firmware.bin bin/smif-ESP32-S2.bin + + - name: Build Filesystem + run: | + cd firmware + mkdir emptyffs + $HOME/.platformio/packages/tool-mkspiffs/mkspiffs_espressif32_arduino -c $PWD/emptyffs/ -s 0x20000 $PWD/bin/varfs.bin + $HOME/.platformio/packages/tool-mkspiffs/mkspiffs_espressif32_arduino -c $PWD/data/ -s 0x20000 $PWD/.pio/build/mainfs.bin + + - name: Upload Artifacts + uses: actions/upload-artifact + with: + name: Firmware-Filesystem + path: firmware/bin