main.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # This is the name of the workflow, visible on GitHub UI.
  2. name: TaskScheduler Examples Build
  3. # Controls when the action will run.
  4. on:
  5. # Triggers the workflow on push or pull request only for the main branch
  6. push:
  7. branches: [ main ]
  8. pull_request:
  9. branches: [ main ]
  10. workflow_dispatch:
  11. # This is the list of jobs that will be run concurrently.
  12. # Since we use a build matrix, the actual number of jobs
  13. # started depends on how many configurations the matrix
  14. # will produce.
  15. jobs:
  16. # This is the name of the job - can be whatever.
  17. ArduinoIDE:
  18. # Here we tell GitHub that the jobs must be determined
  19. # dynamically depending on a matrix configuration.
  20. strategy:
  21. matrix:
  22. # The matrix will produce one job for each configuration
  23. # parameter of type `arduino-platform`, in this case, it
  24. # is only 1.
  25. arduino-platform: ["arduino:avr"]
  26. # This is usually optional but we need to statically define the
  27. # FQBN of the boards we want to test for each platform. In the
  28. # future the CLI might automatically detect and download the
  29. # core needed to compile against a certain FQBN, at that point
  30. # the following `include` section will be useless.
  31. include:
  32. # This works like this: when the platformn is "arduino:avr",
  33. # the variable `fqbn` is set to "arduino:avr:uno".
  34. - arduino-platform: "arduino:avr"
  35. fqbn: "arduino:avr:uno"
  36. - arduino-platform: "esp32:esp32"
  37. fqbn: "esp32:esp32:esp32"
  38. # This is the platform GitHub will use to run our workflow,
  39. # I picked ubuntu.
  40. runs-on: ubuntu-latest
  41. # This is the list of steps this job will run.
  42. steps:
  43. # First of all, we clone the repo using the `checkout` action.
  44. - name: Checkout
  45. uses: actions/checkout@main
  46. # We use the `arduino/setup-arduino-cli` action to install and
  47. # configure the Arduino CLI on the system.
  48. - name: Setup Arduino CLI
  49. uses: arduino/setup-arduino-cli@v1.1.1
  50. # We then install the platform, which one will be determined
  51. # dynamically by the build matrix.
  52. - name: Install platform
  53. run: |
  54. arduino-cli core update-index
  55. arduino-cli core install ${{ matrix.arduino-platform }}
  56. - name: Install repo as library
  57. run: |
  58. mkdir -p "$HOME/Arduino/libraries"
  59. ln -s "$PWD" "$HOME/Arduino/libraries/."
  60. # Finally, we compile the sketch, using the FQBN that was set
  61. # in the build matrix.
  62. - name: Scheduler_example00_Blink
  63. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example00_Blink --warnings more
  64. - name: Scheduler_example00_Blink_Namespace
  65. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example00_Blink_Namespace --warnings more
  66. - name: Scheduler_example01
  67. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example01 --warnings more
  68. - name: Scheduler_example02
  69. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example02 --warnings more
  70. - name: Scheduler_example03
  71. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example03 --warnings more
  72. - name: Scheduler_example04_StatusRequest
  73. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example04_StatusRequest --warnings more
  74. - name: Scheduler_example05_StatusRequest
  75. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example05_StatusRequest --warnings more
  76. - name: Scheduler_example06_IDLE
  77. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example06_IDLE --warnings more
  78. - name: Scheduler_example07_WDT
  79. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example07_WDT --warnings more
  80. - name: Scheduler_example08_LTS
  81. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example08_LTS --warnings more
  82. - name: Scheduler_example09_TimeCritical
  83. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example09_TimeCritical --warnings more
  84. - name: Scheduler_example10_Benchmark
  85. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example10_Benchmark --warnings more
  86. - name: Scheduler_example11_Priority
  87. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example11_Priority --warnings more
  88. - name: Scheduler_example12_Priority
  89. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example12_Priority --warnings more
  90. - name: Scheduler_example13_Micros
  91. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example13_Micros --warnings more
  92. # - name: Scheduler_example14_Yield # this is esp8266 only example
  93. # run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example14_Yield --warnings more
  94. ArduinoIDE_ESP8266_ONLY:
  95. strategy:
  96. matrix:
  97. include:
  98. - arduino-platform: "esp8266:esp8266"
  99. fqbn: "esp8266:esp8266:nodemcuv2"
  100. runs-on: ubuntu-latest
  101. steps:
  102. - name: Checkout
  103. uses: actions/checkout@main
  104. - name: Setup Arduino CLI
  105. uses: arduino/setup-arduino-cli@v1.1.1
  106. - name: Install platform
  107. run: |
  108. arduino-cli core update-index
  109. arduino-cli core install ${{ matrix.arduino-platform }}
  110. - name: Install repo as library
  111. run: |
  112. mkdir -p "$HOME/Arduino/libraries"
  113. ln -s "$PWD" "$HOME/Arduino/libraries/."
  114. - name: Scheduler_example14_Yield
  115. run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/Scheduler_example14_Yield --warnings more