|
| 1 | +name: Compile Examples |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + |
| 9 | + env: |
| 10 | + # libraries to install |
| 11 | + UNIVERSAL_LIBRARIES: '"ArduinoCloudThing" "Arduino_ConnectionHandler" "Arduino_DebugUtils" "ArduinoMqttClient"' |
| 12 | + # board-specific libraries |
| 13 | + WIFI_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "WiFi101" "WiFiNINA"' |
| 14 | + WAN_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRWAN"' |
| 15 | + GSM_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRGSM"' |
| 16 | + NB_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRNB"' |
| 17 | + ESP8266_LIBRARIES: '' |
| 18 | + # sketch paths to compile (recursive) |
| 19 | + UNIVERSAL_SKETCH_PATHS: '"examples/ArduinoIoTCloud-Advanced" "examples/ArduinoIoTCloud-Basic" "examples/utility/ArduinoIoTCloud_Travis_CI"' |
| 20 | + # board-specific sketches |
| 21 | + WIFI_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/WiFi_Cloud_Blink"' |
| 22 | + WAN_SKETCH_PATHS: '' |
| 23 | + GSM_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/GSM_Cloud_Blink"' |
| 24 | + NB_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/NB_Cloud_Blink"' |
| 25 | + ESP8266_SKETCH_PATHS: '"examples/utility/WiFi_Cloud_Blink_with_security_credentials"' |
| 26 | + |
| 27 | + strategy: |
| 28 | + fail-fast: false |
| 29 | + |
| 30 | + matrix: |
| 31 | + board: [ |
| 32 | + {"fqbn": "arduino:samd:mkr1000", "type": "WIFI"}, |
| 33 | + {"fqbn": "arduino:samd:mkrwifi1010", "type": "WIFI"}, |
| 34 | + {"fqbn": "arduino:samd:nano_33_iot", "type": "WIFI"}, |
| 35 | + {"fqbn": "arduino:samd:mkrwan1300", "type": "WAN"}, |
| 36 | + {"fqbn": "arduino:samd:mkrgsm1400", "type": "GSM"}, |
| 37 | + {"fqbn": "arduino:samd:mkrnb1500", "type": "NB"}, |
| 38 | + {"fqbn": '"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"', "type": "ESP8266"} |
| 39 | + ] |
| 40 | + |
| 41 | + steps: |
| 42 | + - name: Checkout |
| 43 | + uses: actions/checkout@v2 |
| 44 | + |
| 45 | + - name: Compile examples |
| 46 | + uses: arduino/actions/libraries/compile-examples@master |
| 47 | + with: |
| 48 | + fqbn: ${{ matrix.board.fqbn }} |
| 49 | + libraries: "${{ env.UNIVERSAL_LIBRARIES }} ${{ env[format('{0}{1}', matrix.board.type, '_LIBRARIES')] }}" |
| 50 | + sketch-paths: "${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ env[format('{0}{1}', matrix.board.type, '_SKETCH_PATHS')] }}" |
0 commit comments