ci.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. name: Arduino Library CI
  2. on:
  3. push:
  4. paths-ignore:
  5. - "**/**.md"
  6. - "LICENSE"
  7. - "keywords.txt"
  8. - "library.json"
  9. - "library.properties"
  10. - "portal"
  11. - "docs/*"
  12. pull_request:
  13. paths-ignore:
  14. - "**/**.md"
  15. - "LICENSE"
  16. - "keywords.txt"
  17. - "library.json"
  18. - "library.properties"
  19. - "portal"
  20. - "docs/*"
  21. jobs:
  22. arduino:
  23. name: Arduino - ${{ matrix.name }}
  24. runs-on: ubuntu-latest
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. include:
  29. - name: ESP8266
  30. core: esp8266:esp8266
  31. board: esp8266:esp8266:huzzah
  32. index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
  33. - name: ESP32
  34. core: esp32:esp32
  35. board: esp32:esp32:esp32
  36. index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
  37. - name: ESP32 (Dev Branch)
  38. core: esp32:esp32
  39. board: esp32:esp32:esp32
  40. index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
  41. - name: Pico W | RP2040+W
  42. core: rp2040:rp2040
  43. board: rp2040:rp2040:rpipicow
  44. index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  45. - name: Pico 2W | RP2350+W
  46. core: rp2040:rp2040
  47. board: rp2040:rp2040:rpipico2w
  48. index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  49. steps:
  50. - name: Checkout
  51. uses: actions/checkout@v4
  52. - name: Arduino Lint
  53. uses: arduino/arduino-lint-action@v1
  54. with:
  55. library-manager: update
  56. - name: Install arduino-cli
  57. run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
  58. - name: Update core index
  59. run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}"
  60. - name: Install core
  61. run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
  62. - name: Install AsyncTCP (ESP32)
  63. if: ${{ matrix.core == 'esp32:esp32' }}
  64. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.3.7
  65. - name: Install ESPAsyncTCP (ESP8266)
  66. if: ${{ matrix.core == 'esp8266:esp8266' }}
  67. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncTCP#v2.0.0
  68. - name: Install RPAsyncTCP (RP2040)
  69. if: ${{ matrix.core == 'rp2040:rp2040' }}
  70. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.2
  71. - name: Install ESPAsyncWebServer
  72. run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncWebServer#v3.7.3
  73. - name: Build Demo
  74. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
  75. - name: Build Demo_AP
  76. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo_AP/Demo_AP.ino"
  77. - name: Build HighPerf
  78. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/HighPerf/HighPerf.ino"
  79. - name: Build Logging
  80. run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Logging/Logging.ino"
  81. platformio:
  82. name: PlatformIO - ${{ matrix.name }}
  83. runs-on: ubuntu-latest
  84. strategy:
  85. fail-fast: false
  86. matrix:
  87. include:
  88. - name: ESP8266 (Huzzah)
  89. env: ci-esp8266
  90. board: huzzah
  91. - name: ESP8266 (D1 Mini)
  92. env: ci-esp8266
  93. board: d1_mini
  94. - name: ESP32 (Arduino Core v2)
  95. env: ci-esp32-arduino-2
  96. board: esp32dev
  97. - name: ESP32
  98. env: ci-esp32
  99. board: esp32dev
  100. - name: ESP32-S2
  101. env: ci-esp32
  102. board: esp32-s2-saola-1
  103. - name: ESP32-S3
  104. env: ci-esp32
  105. board: esp32-s3-devkitc-1
  106. - name: ESP32-C3
  107. env: ci-esp32
  108. board: esp32-c3-devkitc-02
  109. - name: ESP32-C6
  110. env: ci-esp32
  111. board: esp32-c6-devkitc-1
  112. - name: Pico W | RP2040+W
  113. env: ci-rp2040
  114. board: rpipicow
  115. - name: Pico 2W | RP2350+W
  116. env: ci-rp2350
  117. board: rpipico2w
  118. steps:
  119. - uses: actions/checkout@v4
  120. - name: Set up cache
  121. uses: actions/cache@v4
  122. with:
  123. key: ${{ runner.os }}-pio
  124. path: |
  125. ~/.platformio
  126. ~/.cache/pip
  127. - name: Setup Python
  128. uses: actions/setup-python@v5
  129. with:
  130. python-version: "3.x"
  131. - name: Setup PlatformIO
  132. run: |
  133. python -m pip install --upgrade pip
  134. pip install --upgrade platformio
  135. - run: PLATFORMIO_SRC_DIR=examples/Demo PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  136. - run: PLATFORMIO_SRC_DIR=examples/Demo_AP PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  137. - run: PLATFORMIO_SRC_DIR=examples/HighPerf PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  138. - run: PLATFORMIO_SRC_DIR=examples/Logging PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  139. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  140. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo_AP" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  141. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Logging" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
  142. - run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}