|
| 1 | +--- |
| 2 | +name: Build Example |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches-ignore: [master] |
| 7 | + pull_request: |
| 8 | + branches: [master] |
| 9 | + workflow_dispatch: {} |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + name: Build |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + espidf_target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c5, esp32c6, esp32c61, esp32h2, esp32p4] |
| 19 | + steps: |
| 20 | + - name: Checkout repository |
| 21 | + uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + submodules: 'recursive' |
| 24 | + |
| 25 | + - name: Build targets with ESP-IDF |
| 26 | + uses: espressif/esp-idf-ci-action@v1 |
| 27 | + with: |
| 28 | + esp_idf_version: "latest" |
| 29 | + target: ${{ matrix.espidf_target }} |
| 30 | + path: 'example' |
| 31 | + command: | |
| 32 | + mkdir -p build && cd build |
| 33 | + cmake -DESP_TARGET=${{ matrix.espidf_target }} -GNinja .. |
| 34 | + ninja |
| 35 | +
|
| 36 | + - name: Upload build artifacts |
| 37 | + uses: actions/upload-artifact@v4 |
| 38 | + with: |
| 39 | + name: stub_${{ matrix.espidf_target }}_artifacts |
| 40 | + path: | |
| 41 | + example/build/stub_${{ matrix.espidf_target }}.elf |
| 42 | + example/build/stub_${{ matrix.espidf_target }}.map |
| 43 | + example/build/stub_${{ matrix.espidf_target }}.asm |
| 44 | + if-no-files-found: error |
| 45 | + |
| 46 | + build-esp8266: |
| 47 | + name: Build (esp8266) |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - name: Checkout repository |
| 51 | + uses: actions/checkout@v4 |
| 52 | + with: |
| 53 | + submodules: 'recursive' |
| 54 | + |
| 55 | + - name: Build ESP8266 with custom toolchain |
| 56 | + run: | |
| 57 | + cd example |
| 58 | + ./build.sh esp8266 |
| 59 | +
|
| 60 | + - name: Upload ESP8266 build artifacts |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: stub_esp8266_artifacts |
| 64 | + path: | |
| 65 | + example/build/esp8266/stub_esp8266.elf |
| 66 | + example/build/esp8266/stub_esp8266.map |
| 67 | + example/build/esp8266/stub_esp8266.asm |
| 68 | + if-no-files-found: error |
0 commit comments