|
| 1 | +# TestCompile.yml |
| 2 | +# Github workflow script to test compile all examples of an Arduino library repository. |
| 3 | +# |
| 4 | +# Copyright (C) 2020 Armin Joachimsmeyer |
| 5 | +# https://github.com/ArminJo/Github-Actions |
| 6 | +# |
| 7 | + |
| 8 | +# This is the name of the workflow, visible on GitHub UI. |
| 9 | +name: TestCompile |
| 10 | +on: |
| 11 | + push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request |
| 12 | + paths: |
| 13 | + - '**.ino' |
| 14 | + - '**.cpp' |
| 15 | + - '**.h' |
| 16 | + - '**TestCompile.yml' |
| 17 | + pull_request: |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + name: Test compiling examples for Digispark |
| 21 | + runs-on: ubuntu-18.04 |
| 22 | + env: |
| 23 | + # Comma separated list without double quotes around the list. |
| 24 | + REQUIRED_LIBRARIES: SparkFun MS5637 Barometric Pressure Library,SparkFun MMA8452Q Accelerometer |
| 25 | + PLATFORM_DEFAULT_URL: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json |
| 26 | + |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + # The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn` |
| 30 | + # In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command |
| 31 | + # |
| 32 | + # Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega |
| 33 | + # arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native" |
| 34 | + # ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro |
| 35 | + # STM32:stm32:GenF1:pnum=BLUEPILL_F103C8 |
| 36 | + # esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80 |
| 37 | + # You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace |
| 38 | + ############################################################################################################# |
| 39 | + arduino-boards-fqbn: |
| 40 | + - SparkFun:apollo3:artemis |
| 41 | + - SparkFun:apollo3:amap3redboard |
| 42 | + - SparkFun:apollo3:amap3nano |
| 43 | + - SparkFun:apollo3:amap3atp |
| 44 | + - SparkFun:apollo3:amap3thing |
| 45 | + - SparkFun:apollo3:edge |
| 46 | + - SparkFun:apollo3:edge2 |
| 47 | + |
| 48 | + |
| 49 | + # Specify parameters for each board. |
| 50 | + # With examples-exclude you may exclude specific examples for a board. Use a comma separated list. |
| 51 | + ############################################################################################################# |
| 52 | + include: |
| 53 | + - arduino-boards-fqbn: SparkFun:apollo3:artemis |
| 54 | + examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example2_MoreSPIPorts,Example6_19servos,Example7_29servos |
| 55 | + |
| 56 | + - arduino-boards-fqbn: SparkFun:apollo3:amap3redboard |
| 57 | + examples-exclude: Example2_MoreSPIPorts |
| 58 | + |
| 59 | + - arduino-boards-fqbn: SparkFun:apollo3:amap3nano |
| 60 | + examples-exclude: Example6_19servos,Example7_29servos |
| 61 | + |
| 62 | + - arduino-boards-fqbn: SparkFun:apollo3:amap3atp |
| 63 | + examples-exclude: Example4_analogRead,Example6_19servos |
| 64 | + |
| 65 | + - arduino-boards-fqbn: SparkFun:apollo3:amap3thing |
| 66 | + |
| 67 | + - arduino-boards-fqbn: SparkFun:apollo3:edge |
| 68 | + examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example6_19servos,Example7_29servos |
| 69 | + |
| 70 | + - arduino-boards-fqbn: SparkFun:apollo3:edge2 |
| 71 | + examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example1_SPI,Example6_19servos,Example7_29servos |
| 72 | + |
| 73 | + # Do not cancel all jobs / architectures if one job fails |
| 74 | + fail-fast: false |
| 75 | + steps: |
| 76 | + - name: Checkout |
| 77 | + uses: actions/checkout@master |
| 78 | + |
| 79 | + - name: Compile all examples |
| 80 | + uses: ArminJo/arduino-test-compile@v2 |
| 81 | + with: |
| 82 | + required-libraries: ${{ env.REQUIRED_LIBRARIES }} |
| 83 | + arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }} |
| 84 | + platform-default-url: ${{ env.PLATFORM_DEFAULT_URL }} |
| 85 | + platform-url: ${{ matrix.platform-url }} |
| 86 | + examples-exclude: ${{ matrix.examples-exclude }} |
| 87 | + examples-build-properties: ${{ toJson(matrix.examples-build-properties) }} |
0 commit comments