|
| 1 | +name: Compile Examples |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/compile-examples.yml" |
| 7 | + - "examples/**" |
| 8 | + - "src/**" |
| 9 | + push: |
| 10 | + paths: |
| 11 | + - ".github/workflows/compile-examples.yml" |
| 12 | + - "examples/**" |
| 13 | + - "src/**" |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + env: |
| 20 | + # libraries to install for all boards |
| 21 | + UNIVERSAL_LIBRARIES: | |
| 22 | + # Install the ArduinoIoTCloud library from the repository |
| 23 | + - source-path: ./ |
| 24 | + - name: Arduino_ConnectionHandler |
| 25 | + - name: ArduinoHttpClient |
| 26 | + - name: Arduino_DebugUtils |
| 27 | + - name: ArduinoMqttClient |
| 28 | + - name: Arduino_SecureElement |
| 29 | + # sketch paths to compile (recursive) for all boards |
| 30 | + UNIVERSAL_SKETCH_PATHS: | |
| 31 | + - examples/lzssDecoder |
| 32 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 33 | + |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + |
| 37 | + matrix: |
| 38 | + board: |
| 39 | + - fqbn: arduino:samd:mkr1000 |
| 40 | + type: mkr1000 |
| 41 | + artifact-name-suffix: arduino-samd-mkr1000 |
| 42 | + - fqbn: arduino:samd:mkrwifi1010 |
| 43 | + type: nina |
| 44 | + artifact-name-suffix: arduino-samd-mkrwifi1010 |
| 45 | + - fqbn: arduino:samd:nano_33_iot |
| 46 | + type: nina |
| 47 | + artifact-name-suffix: arduino-samd-nano_33_iot |
| 48 | + - fqbn: arduino:samd:mkrwan1300 |
| 49 | + type: wan |
| 50 | + artifact-name-suffix: arduino-samd-mkrwan1300 |
| 51 | + - fqbn: arduino:samd:mkrgsm1400 |
| 52 | + type: gsm |
| 53 | + artifact-name-suffix: arduino-samd-mkrgsm1400 |
| 54 | + - fqbn: arduino:samd:mkrnb1500 |
| 55 | + type: nb |
| 56 | + artifact-name-suffix: arduino-samd-mkrnb1500 |
| 57 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 58 | + type: mbed_portenta |
| 59 | + artifact-name-suffix: arduino-mbed_portenta-envie_m7 |
| 60 | + - fqbn: esp8266:esp8266:huzzah |
| 61 | + type: esp8266 |
| 62 | + artifact-name-suffix: esp8266-esp8266-huzzah |
| 63 | + - fqbn: esp32:esp32:esp32 |
| 64 | + type: esp32 |
| 65 | + artifact-name-suffix: esp32-esp32-esp32 |
| 66 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 67 | + type: nina |
| 68 | + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect |
| 69 | + - fqbn: arduino:mbed_nicla:nicla_vision |
| 70 | + type: mbed_nicla |
| 71 | + artifact-name-suffix: arduino-mbed_nicla-nicla_vision |
| 72 | + - fqbn: arduino:mbed_opta:opta |
| 73 | + type: mbed_opta |
| 74 | + artifact-name-suffix: arduino-mbed_opta-opta |
| 75 | + - fqbn: arduino:mbed_giga:giga |
| 76 | + type: mbed_giga |
| 77 | + artifact-name-suffix: arduino-mbed_giga-giga |
| 78 | + - fqbn: arduino:renesas_portenta:portenta_c33 |
| 79 | + type: renesas_portenta |
| 80 | + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 |
| 81 | + - fqbn: arduino:renesas_uno:unor4wifi |
| 82 | + type: renesas_uno |
| 83 | + artifact-name-suffix: arduino-renesas_uno-unor4wifi |
| 84 | + - fqbn: arduino:esp32:nano_nora |
| 85 | + type: arduino_esp32 |
| 86 | + artifact-name-suffix: arduino-esp32-nano_nora |
| 87 | + - fqbn: arduino:mbed_edge:edge_control |
| 88 | + type: mbed_edge |
| 89 | + artifact-name-suffix: arduino-mbed_edge-edge_control |
| 90 | + |
| 91 | + steps: |
| 92 | + - name: Checkout |
| 93 | + uses: actions/checkout@v4 |
| 94 | + |
| 95 | + - name: Install ESP32 platform dependencies |
| 96 | + if: matrix.board.type == 'esp32' |
| 97 | + run: pip3 install pyserial |
| 98 | + |
| 99 | + - name: Compile examples |
| 100 | + uses: arduino/compile-sketches@v1 |
| 101 | + with: |
| 102 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 103 | + platforms: ${{ matrix.platforms }} |
| 104 | + fqbn: ${{ matrix.board.fqbn }} |
| 105 | + libraries: | |
| 106 | + ${{ env.UNIVERSAL_LIBRARIES }} |
| 107 | + ${{ matrix.libraries }} |
| 108 | + sketch-paths: | |
| 109 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 110 | + ${{ matrix.sketch-paths }} |
| 111 | + enable-deltas-report: "true" |
| 112 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 113 | + |
| 114 | + - name: Save memory usage change report as artifact |
| 115 | + if: github.event_name == 'pull_request' |
| 116 | + uses: actions/upload-artifact@v4 |
| 117 | + with: |
| 118 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 119 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments