|
| 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 ArduinoBearSSL library from the local path |
| 23 | + - source-path: ./ |
| 24 | + - name: ArduinoECCX08 |
| 25 | + # sketch paths to compile (recursive) for all boards |
| 26 | + UNIVERSAL_SKETCH_PATHS: '"examples/SHA1" "examples/SHA256"' |
| 27 | + |
| 28 | + strategy: |
| 29 | + fail-fast: false |
| 30 | + |
| 31 | + matrix: |
| 32 | + board: |
| 33 | + - fqbn: arduino:samd:mkr1000 |
| 34 | + type: wifi101 |
| 35 | + - fqbn: arduino:samd:mkrgsm1400 |
| 36 | + type: gsm |
| 37 | + - fqbn: arduino:megaavr:uno2018 |
| 38 | + type: megaavr |
| 39 | + |
| 40 | + # make board type-specific customizations to the matrix jobs |
| 41 | + include: |
| 42 | + # WiFi101-compatible boards |
| 43 | + - board: |
| 44 | + type: wifi101 |
| 45 | + libraries: | |
| 46 | + - name: WiFi101 |
| 47 | + sketch-paths: '"examples/WiFiSSLClient"' |
| 48 | + # GSM boards |
| 49 | + - board: |
| 50 | + type: gsm |
| 51 | + libraries: | |
| 52 | + - name: MKRGSM |
| 53 | + sketch-paths: '"examples/MKRGSMSSLClient"' |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v2 |
| 58 | + |
| 59 | + - name: Compile examples |
| 60 | + uses: per1234/actions/libraries/compile-examples@beaac5ae4bb7ab294f1305e436172fde4c281fc8 |
| 61 | + with: |
| 62 | + fqbn: ${{ matrix.board.fqbn }} |
| 63 | + libraries: | |
| 64 | + ${{ env.UNIVERSAL_LIBRARIES }} |
| 65 | + ${{ matrix.libraries }} |
| 66 | + sketch-paths: ${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }} |
| 67 | + size-report-sketch: SHA256 |
| 68 | + enable-size-deltas-report: true |
| 69 | + verbose: true |
| 70 | + |
| 71 | + - name: Save sketches report as artifact |
| 72 | + if: github.event_name == 'pull_request' |
| 73 | + uses: actions/upload-artifact@v2 |
| 74 | + with: |
| 75 | + name: size-deltas-reports |
| 76 | + path: size-deltas-reports |
0 commit comments