Skip to content

Commit

Permalink
Merge pull request #237 from mathieucarbou/update
Browse files Browse the repository at this point in the history
Update version and CI
  • Loading branch information
ayushsharma82 authored Oct 13, 2024
2 parents 8ab0294 + 54ad198 commit a9ec6b2
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 65 deletions.
94 changes: 54 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,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.3
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.10

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

- name: Install ArduinoJson
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/bblanchon/ArduinoJson#v7.1.0
Expand All @@ -86,58 +86,72 @@ jobs:
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Interactive/Interactive.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"
- run: pip install platformio
- run: platformio platform install ${{ matrix.platform }}

- run: platformio ci "examples/AccessPoint/AccessPoint.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: platformio ci "examples/Basic/Basic.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: platformio ci "examples/Benchmark/Benchmark.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: platformio ci "examples/Chart/Chart.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: platformio ci "examples/Dynamic/Dynamic.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
- run: platformio ci "examples/Interactive/Interactive.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/AccessPoint PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Basic PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Benchmark PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Chart PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Dynamic PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Interactive PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"owner": "mathieucarbou",
"name": "ESPAsyncWebServer",
"version": "^3.1.1",
"version": "^3.3.14",
"platforms": ["espressif8266", "espressif32"]
}
]
Expand Down
52 changes: 29 additions & 23 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[platformio]
lib_dir = .
; src_dir = examples/AccessPoint
; src_dir = examples/Basic
src_dir = examples/Benchmark
; src_dir = examples/Chart
; src_dir = examples/Dynamic
; src_dir = examples/Interactive

[env]
framework = arduino
build_flags =
Expand All @@ -6,40 +15,37 @@ build_flags =
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
lib_deps =
bblanchon/ArduinoJson@^7.1.0
mathieucarbou/AsyncTCP@^3.2.3
mathieucarbou/ESPAsyncWebServer@^3.1.1
mathieucarbou/ESPAsyncWebServer@^3.3.14
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file

[platformio]
lib_dir = .
; src_dir = examples/AccessPoint
; src_dir = examples/Basic
src_dir = examples/Benchmark
; src_dir = examples/Chart
; src_dir = examples/Dynamic
; src_dir = examples/Interactive

[env:arduino]
platform = espressif32
board = esp32-s3-devkitc-1

[env:arduino-2]
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
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10-rc1/platform-espressif32.zip
board = esp32-s3-devkitc-1

[env:esp8266]
platform = espressif8266
board = huzzah
lib_deps =
bblanchon/ArduinoJson@^7.1.0
mathieucarbou/ESPAsyncWebServer@^3.1.1
esphome/ESPAsyncTCP-esphome@^2.0.0

; 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}
2 changes: 1 addition & 1 deletion src/ESPDash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ESPDash::ESPDash(AsyncWebServer* server, const char* uri, bool enable_default_st
generateLayoutJSON(client, false);
_asyncAccessInProgress = false;
} else if (json["command"] == "ping") {
return _ws->text(client->id(), "{\"command\":\"pong\"}");
_ws->text(client->id(), "{\"command\":\"pong\"}");
} else if (json["command"] == "button:clicked") {
// execute and reference card data struct to funtion
uint32_t id = json["id"].as<uint32_t>();
Expand Down

0 comments on commit a9ec6b2

Please sign in to comment.