|
| 1 | +name: Build ESP-IDF Project |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, develop ] |
| 6 | + pull_request: |
| 7 | + branches: [ main, develop ] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout repository |
| 16 | + uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Checkout ESP HomeKit SDK |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + repository: espressif/esp-homekit-sdk |
| 22 | + path: esp/esp-homekit-sdk |
| 23 | + ref: bfbcd6e749635d97645380b9d7b32274553fe017 |
| 24 | + |
| 25 | + - name: ESP-IDF Build |
| 26 | + uses: espressif/esp-idf-ci-action@v1 |
| 27 | + with: |
| 28 | + esp_idf_version: v5.4.1 |
| 29 | + target: esp32s3 |
| 30 | + path: '.' |
| 31 | + command: | |
| 32 | + idf.py build |
| 33 | + |
| 34 | + - name: Upload build artifacts |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: konnected-homekit-firmware |
| 38 | + path: | |
| 39 | + build/konnected-homekit.bin |
| 40 | + build/bootloader/bootloader.bin |
| 41 | + build/partition_table/partition-table.bin |
| 42 | + build/flash_args |
| 43 | + build/flasher_args.json |
| 44 | + if-no-files-found: error |
| 45 | + |
| 46 | + - name: Upload build size report |
| 47 | + if: success() |
| 48 | + run: | |
| 49 | + idf.py size > size-report.txt |
| 50 | + cat size-report.txt |
| 51 | + continue-on-error: true |
| 52 | + |
| 53 | + - name: Archive build size report |
| 54 | + uses: actions/upload-artifact@v4 |
| 55 | + if: success() |
| 56 | + with: |
| 57 | + name: build-size-report |
| 58 | + path: size-report.txt |
| 59 | + if-no-files-found: ignore |
0 commit comments