ci.yml 5.1 KB

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