ci.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. name: Arduino Library CI
  2. on:
  3. push:
  4. paths-ignore:
  5. - "**/**.md"
  6. - "/keywords.txt"
  7. - "/library.json"
  8. - "/library.properties"
  9. - "/vue-frontend"
  10. - "/docs"
  11. pull_request:
  12. paths-ignore:
  13. - "**/**.md"
  14. - "/keywords.txt"
  15. - "/library.json"
  16. - "/library.properties"
  17. - "/vue-frontend"
  18. - "/docs"
  19. jobs:
  20. arduino:
  21. name: arduino ${{ matrix.name }}
  22. runs-on: ubuntu-latest
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. include:
  27. - name: package_esp32_index.json
  28. core: esp32:esp32
  29. board: esp32:esp32:esp32
  30. index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
  31. - name: package_esp32_dev_index.json
  32. core: esp32:esp32
  33. board: esp32:esp32:esp32
  34. index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
  35. - name: package_esp8266com_index.json
  36. core: esp8266:esp8266
  37. board: esp8266:esp8266:huzzah
  38. index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
  39. steps:
  40. - name: Checkout
  41. uses: actions/checkout@v4
  42. - name: Arduino Lint
  43. uses: arduino/arduino-lint-action@v1
  44. with:
  45. library-manager: update
  46. - name: Install arduino-cli
  47. run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
  48. - name: Update core index
  49. run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}"
  50. - name: Install core
  51. run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
  52. - name: Install AsyncTCP
  53. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.1.4
  54. - name: Install ESPAsyncTCP
  55. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0
  56. - name: Install ESPAsyncWebServer
  57. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v2.10.4
  58. - name: Build Demo
  59. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
  60. - name: Build Demo_AP
  61. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo_AP/Demo_AP.ino"
  62. - name: Build Logging
  63. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Logging/Logging.ino"
  64. - name: Build HighPerf
  65. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/HighPerf/HighPerf.ino"
  66. platformio:
  67. name: pio ${{ matrix.name }}
  68. runs-on: ubuntu-latest
  69. strategy:
  70. fail-fast: false
  71. matrix:
  72. include:
  73. - name: esp32dev|arduino
  74. board: esp32dev
  75. platform: espressif32
  76. opts:
  77. - name: esp32dev|arduino-2
  78. board: esp32dev
  79. platform: espressif32@6.7.0
  80. opts:
  81. - name: esp32dev|arduino-3
  82. board: esp32dev
  83. platform: espressif32
  84. opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip'"
  85. - name: esp32-s3-devkitc-1|arduino
  86. board: esp32-s3-devkitc-1
  87. platform: espressif32
  88. opts:
  89. - name: esp32-s3-devkitc-1|arduino-2
  90. board: esp32-s3-devkitc-1
  91. platform: espressif32@6.7.0
  92. opts:
  93. - name: esp32-s3-devkitc-1|arduino-3
  94. board: esp32-s3-devkitc-1
  95. platform: espressif32
  96. opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip'"
  97. - name: huzzah|espressif8266
  98. board: huzzah
  99. platform: espressif8266
  100. opts:
  101. steps:
  102. - uses: actions/checkout@v4
  103. - name: Set up cache
  104. uses: actions/cache@v4
  105. with:
  106. path: |
  107. ~/.platformio
  108. ~/.cache/pip
  109. key: ${{ matrix.name }}
  110. - uses: actions/setup-python@v5
  111. with:
  112. python-version: "3.x"
  113. - run: pip install platformio
  114. - run: platformio platform install ${{ matrix.platform }}
  115. - run: platformio ci "examples/Demo/Demo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  116. - run: platformio ci "examples/Demo_AP/Demo_AP.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  117. - run: platformio ci "examples/Logging/Logging.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  118. - run: platformio ci "examples/HighPerf/HighPerf.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  119. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Demo/Demo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  120. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Demo_AP/Demo_AP.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  121. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Logging/Logging.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
  122. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/HighPerf/HighPerf.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}