Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating libs and improving CI #227

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 50 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ jobs:
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}

- name: Install AsyncTCP
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.5
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.6

- name: Install ESPAsyncTCP
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#v3.2.4
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.3.11

- name: Build Demo
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
Expand All @@ -86,56 +86,69 @@ jobs:
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/AsyncDemo/AsyncDemo.ino"

platformio:
name: pio ${{ matrix.name }}
name: "pio:${{ matrix.env }}:${{ matrix.board }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: esp32dev|arduino
- env: ci-arduino-2
board: esp32dev
platform: espressif32
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32dev|arduino-2
board: esp32dev
platform: [email protected]
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32dev|arduino-3
board: esp32dev
platform: espressif32
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip'"
- name: esp32-s3-devkitc-1|arduino
- env: ci-arduino-2
board: esp32-s2-saola-1
- env: ci-arduino-2
board: esp32-s3-devkitc-1
platform: espressif32
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32-s3-devkitc-1|arduino-2
- env: ci-arduino-2
board: esp32-c3-devkitc-02

- env: ci-arduino-3
board: esp32dev
- env: ci-arduino-3
board: esp32-s2-saola-1
- env: ci-arduino-3
board: esp32-s3-devkitc-1
platform: [email protected]
opts: "--project-option 'lib_compat_mode = strict'"
- name: esp32-s3-devkitc-1|arduino-3
- env: ci-arduino-3
board: esp32-c3-devkitc-02
- env: ci-arduino-3
board: esp32-c6-devkitc-1

- env: ci-arduino-310rc1
board: esp32dev
- env: ci-arduino-310rc1
board: esp32-s2-saola-1
- env: ci-arduino-310rc1
board: esp32-s3-devkitc-1
platform: espressif32
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip'"
- name: huzzah|espressif8266
- env: ci-arduino-310rc1
board: esp32-c3-devkitc-02
- env: ci-arduino-310rc1
board: esp32-c6-devkitc-1

- env: ci-esp8266
board: huzzah
platform: espressif8266
opts: "--project-option 'lib_compat_mode = strict'"
- env: ci-esp8266
board: d1_mini
steps:
- uses: actions/checkout@v4
- name: Set up cache
- name: Checkout
uses: actions/checkout@v4

- name: Cache PlatformIO
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pio
path: |
~/.platformio
~/.cache/pip
key: ${{ matrix.name }}
- uses: actions/setup-python@v5
~/.platformio

- name: Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install PlatformIO
run: pip install platformio
- name: Install Platform
run: platformio platform install ${{ matrix.platform }}

- run: platformio ci "examples/Demo/Demo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: PLATFORMIO_BUILD_FLAGS="-DELEGANTOTA_USE_ASYNC_WEBSERVER=1" platformio ci "examples/AsyncDemo/AsyncDemo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- name: Build
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio

- run: PLATFORMIO_SRC_DIR=examples/Demo PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DELEGANTOTA_USE_ASYNC_WEBSERVER=1" PLATFORMIO_SRC_DIR=examples/AsyncDemo PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

2 changes: 0 additions & 2 deletions examples/AsyncDemo/AsyncDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@

#if defined(ESP8266)
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#elif defined(ESP32)
#include <WiFi.h>
#include <AsyncTCP.h>
#endif

#include <ESPAsyncWebServer.h>
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"owner": "mathieucarbou",
"name": "ESPAsyncWebServer",
"version": "^3.2.4",
"version": "^3.3.11",
"platforms": ["espressif8266", "espressif32"]
}
],
Expand Down
60 changes: 39 additions & 21 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,47 +1,65 @@
[platformio]
lib_dir = .
; src_dir = examples/Demo
src_dir = examples/AsyncDemo

[env]
framework = arduino
build_flags =
-Wall -Wextra
-D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
mathieucarbou/AsyncTCP@^3.2.5
mathieucarbou/ESPAsyncWebServer@^3.2.4
mathieucarbou/ESPAsyncWebServer@^3.3.11
lib_compat_mode = strict
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file
build_flags =
-Wall -Wextra

[platformio]
lib_dir = .
; src_dir = examples/Demo
src_dir = examples/AsyncDemo
; DEV

[env:arduino]
platform = espressif32
board = esp32-s3-devkitc-1
[dev]
build_flags =
-Wall -Wextra
-D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-D ELEGANTOTA_USE_ASYNC_WEBSERVER=1

[env:arduino-2]
build_flags = ${env.build_flags} ${dev.build_flags}
platform = [email protected]
board = esp32-s3-devkitc-1

[env:arduino-3]
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip
build_flags = ${env.build_flags} ${dev.build_flags}
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10-rc1/platform-espressif32.zip
board = esp32-s3-devkitc-1

[env:esp8266]
build_flags = ${env.build_flags} ${dev.build_flags}
platform = espressif8266
board = huzzah
lib_deps =
mathieucarbou/ESPAsyncWebServer@^3.2.4
esphome/ESPAsyncTCP-esphome@^2.0.0
mathieucarbou/ESPAsyncWebServer@^3.3.11

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
board_build.core = earlephilhower

; CI

[env:ci-arduino-2]
platform = [email protected]
board = ${sysenv.PIO_BOARD}

[env:ci-arduino-3]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
board = ${sysenv.PIO_BOARD}

[env:ci-arduino-310rc1]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10-rc1/platform-espressif32.zip
board = ${sysenv.PIO_BOARD}

[env:ci-esp8266]
platform = espressif8266
board = ${sysenv.PIO_BOARD}
Loading