|
| 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 | + schedule: |
| 15 | + # run every Tuesday at 3 AM UTC to catch breakage caused by changes to external dependencies (libraries, platforms) |
| 16 | + - cron: "0 3 * * 2" |
| 17 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch |
| 18 | + workflow_dispatch: |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + |
| 24 | + env: |
| 25 | + # Libraries to install for all boards |
| 26 | + UNIVERSAL_LIBRARIES: | |
| 27 | + # Install the ArduinoModbus library from the local path |
| 28 | + - source-path: ./ |
| 29 | + - name: ArduinoRS485 |
| 30 | + UNIVERSAL_SKETCH_PATHS: | |
| 31 | + - examples/RTU |
| 32 | +
|
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + |
| 36 | + matrix: |
| 37 | + board: |
| 38 | + - fqbn: arduino:avr:nano |
| 39 | + nina: false |
| 40 | + - fqbn: arduino:avr:leonardo |
| 41 | + nina: false |
| 42 | + - fqbn: arduino:megaavr:uno2018:mode=off |
| 43 | + nina: true |
| 44 | + - fqbn: arduino:samd:mkrwifi1010 |
| 45 | + nina: true |
| 46 | + - fqbn: arduino:mbed:nano33ble |
| 47 | + nina: false |
| 48 | + - fqbn: arduino:mbed:envie_m7 |
| 49 | + nina: false |
| 50 | + |
| 51 | + # Make board type-specific customizations to the matrix jobs |
| 52 | + include: |
| 53 | + - board: |
| 54 | + # Boards with NINA-W102 module |
| 55 | + nina: true |
| 56 | + # Install these libraries in addition to the ones defined by env.UNIVERSAL_LIBRARIES |
| 57 | + nina-libraries: | |
| 58 | + - name: WiFiNINA |
| 59 | + # Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS |
| 60 | + nina-sketch-paths: | |
| 61 | + - examples/TCP |
| 62 | + - board: |
| 63 | + nina: false |
| 64 | + nina-libraries: "" |
| 65 | + nina-sketch-paths: "" |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Checkout |
| 69 | + uses: actions/checkout@v2 |
| 70 | + |
| 71 | + - name: Compile examples |
| 72 | + uses: arduino/compile-sketches@main |
| 73 | + with: |
| 74 | + fqbn: ${{ matrix.board.fqbn }} |
| 75 | + libraries: | |
| 76 | + ${{ env.UNIVERSAL_LIBRARIES }} |
| 77 | + ${{ matrix.nina-libraries }} |
| 78 | + sketch-paths: | |
| 79 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 80 | + ${{ matrix.nina-sketch-paths }} |
0 commit comments