From 549aa98e9433ef1172c29e317235c05ff0e849c1 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Thu, 30 May 2024 12:06:13 +0200 Subject: [PATCH] Fix CI (#214) --- .github/workflows/ci.yml | 71 +++++++++++++++++++++++++++------------- library.json | 2 +- platformio.ini | 6 ++-- 3 files changed, 53 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d9b6607..7f4a9b5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,45 +20,72 @@ on: jobs: arduino: - name: arduino ${{ matrix.platform }} + name: arduino ${{ matrix.name }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - platform: [esp8266, esp32] + include: + - name: package_esp32_index.json + core: esp32:esp32 + board: esp32:esp32:esp32 + index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json + - name: package_esp32_dev_index.json + core: esp32:esp32 + board: esp32:esp32:esp32 + index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json + - name: package_esp8266com_index.json + core: esp8266:esp8266 + board: esp8266:esp8266:huzzah + index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json steps: - - uses: actions/setup-python@v1 - with: - python-version: "3.x" - - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 - - uses: actions/checkout@v2 + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1 with: - repository: ayushsharma82/ci-arduino - path: ci + library-manager: update - - name: pre-install - run: bash ci/actions_install.sh + - name: Install arduino-cli + run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh - - name: Set configuration - run: arduino-cli config set library.enable_unsafe_install true + - name: Update core index + run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}" - - name: Install AsyncTCP - run: arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.1.2 + - name: Install core + run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }} - - name: Install ESPAsyncWebServer - run: arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v2.10.0 + - name: Install AsyncTCP + run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.1.4 - name: Install ESPAsyncTCP - run: arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0 + run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0 + + - name: Install ESPAsyncWebServer + run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v2.10.1 - name: Install ArduinoJson - run: arduino-cli lib install --git-url https://github.com/bblanchon/ArduinoJson#v7.0.4 + run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/bblanchon/ArduinoJson#v7.0.4 + + - name: Build AccessPoint + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/AccessPoint/AccessPoint.ino" + + - name: Build Basic + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Basic/Basic.ino" + + - name: Build Benchmark + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Benchmark/Benchmark.ino" + + - name: Build Chart + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Chart/Chart.ino" + + - name: Build Dynamic + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Dynamic/Dynamic.ino" - - name: Build Examples - run: python3 ci/build_platform.py ${{ matrix.platform }} + - name: Build Interactive + run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Interactive/Interactive.ino" platformio: name: pio ${{ matrix.name }} diff --git a/library.json b/library.json index e829ed49..c94c45c8 100644 --- a/library.json +++ b/library.json @@ -28,7 +28,7 @@ { "owner": "mathieucarbou", "name": "ESP Async WebServer", - "version": "^2.10.0", + "version": "^2.10.1", "platforms": ["espressif8266", "espressif32"] } ] diff --git a/platformio.ini b/platformio.ini index 0dc7196b..0c1b21e0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -6,8 +6,8 @@ build_flags = -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG lib_deps = bblanchon/ArduinoJson @ 7.0.4 - mathieucarbou/Async TCP @ ^3.1.2 - mathieucarbou/ESP Async WebServer @ 2.10.0 + mathieucarbou/Async TCP @ ^3.1.4 + mathieucarbou/ESP Async WebServer @ 2.10.1 upload_protocol = esptool monitor_speed = 115200 monitor_filters = esp32_exception_decoder, log2file @@ -41,5 +41,5 @@ platform = espressif8266 board = huzzah lib_deps = bblanchon/ArduinoJson @ 7.0.4 - mathieucarbou/ESP Async WebServer @ 2.10.0 + mathieucarbou/ESP Async WebServer @ 2.10.1 esphome/ESPAsyncTCP-esphome @ 2.0.0