diff --git a/.github/workflows/build-firmware.yml b/.github/workflows/build-firmware.yml new file mode 100644 index 0000000..5921ec9 --- /dev/null +++ b/.github/workflows/build-firmware.yml @@ -0,0 +1,65 @@ +name: Build Skeleton Key Firmware + +on: + push: + branches: [ main, skeleton-key-final ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache PlatformIO + uses: actions/cache@v3 + with: + path: | + ~/.platformio + .pio + key: ${{ runner.os }}-pio-${{ hashFiles('**/platformio.ini') }} + restore-keys: | + ${{ runner.os }}-pio- + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install platformio + + - name: Build Firmware + run: | + pio run -e m5stack-cardputer + + - name: Upload Firmware Artifact + uses: actions/upload-artifact@v4 + with: + name: skeleton-key-firmware-${{ github.sha }} + path: .pio/build/m5stack-cardputer/firmware.bin + retention-days: 30 + + - name: Upload Bootloader + uses: actions/upload-artifact@v4 + with: + name: skeleton-key-bootloader-${{ github.sha }} + path: .pio/build/m5stack-cardputer/bootloader.bin + retention-days: 30 + if-no-files-found: warn + + - name: Upload Partitions + uses: actions/upload-artifact@v4 + with: + name: skeleton-key-partitions-${{ github.sha }} + path: .pio/build/m5stack-cardputer/partitions.bin + retention-days: 30 + if-no-files-found: warn diff --git a/drivers/cardputer_adv_driver.h b/drivers/cardputer_adv_driver.h index 0e2c84a..018de4d 100644 --- a/drivers/cardputer_adv_driver.h +++ b/drivers/cardputer_adv_driver.h @@ -1,9 +1,7 @@ #ifndef CARDPUTER_ADV_DRIVER_H #define CARDPUTER_ADV_DRIVER_H -#include -#include - +// Forward declarations - actual includes in .cpp file void initialize_driver(); bool initialize_sd_card();