Skip to content

Commit

Permalink
Arduino 3 / ESP-IDF 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed May 29, 2024
1 parent 54fcd10 commit 32961d3
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 67 deletions.
45 changes: 34 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,51 @@ name: Async TCP CI

on:
push:
branches:
pull_request:
workflow_dispatch:

jobs:

build-arduino:
name: Arduino on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
config: [arduino-cli.yaml, arduino-cli-dev.yaml]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/setup-arduino-cli@v1
- name: Download board
run: |
arduino-cli --config-file arduino-cli.yaml core update-index
arduino-cli --config-file arduino-cli.yaml board listall
arduino-cli --config-file arduino-cli.yaml core install esp32:esp32@2.0.2
arduino-cli --config-file ${{ matrix.config }} core update-index
arduino-cli --config-file ${{ matrix.config }} board listall
arduino-cli --config-file ${{ matrix.config }} core install esp32:esp32
- name: Compile Sketch
run: arduino-cli --config-file arduino-cli.yaml --library ./src/ compile --fqbn esp32:esp32:esp32 ./examples/ClientServer/Client/Client.ino
run: arduino-cli --config-file ${{ matrix.config }} --library ./src/ compile --fqbn esp32:esp32:esp32 ./examples/ClientServer/Client/Client.ino
- name: Compile Sketch with IPv6
env:
LWIP_IPV6: true
run: arduino-cli --config-file arduino-cli.yaml --library ./src/ compile --fqbn esp32:esp32:esp32 ./examples/ClientServer/Client/Client.ino
run: arduino-cli --config-file ${{ matrix.config }} --library ./src/ compile --fqbn esp32:esp32:esp32 ./examples/ClientServer/Client/Client.ino

build-pio:
name: ${{ matrix.board }} ${{ matrix.env }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: [esp32dev, esp32-s3-devkitc-1]
env: [arduino-2, arduino-3]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.platformio
~/.cache/pip
key: ${{ matrix.env }}
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install platformio
- run: sed -i -e 's/esp32dev/${{ matrix.board }}/g' platformio.ini
- run: pio run -e ${{ matrix.env }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

.DS_Store
.lh
/.pio
/.vscode/*
!/.vscode/settings.json
/logs
25 changes: 25 additions & 0 deletions arduino-cli-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
board_manager:
additional_urls:
- https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
directories:
builtin.libraries: ./src/
build_cache:
compilations_before_purge: 10
ttl: 720h0m0s
daemon:
port: "50051"
library:
enable_unsafe_install: false
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true
9 changes: 9 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
me=AsyncTCP-esphome
version=2.1.3
author=Me-No-Dev
maintainer=ESPHome
sentence=Async TCP Library for ESP32
paragraph=Async TCP Library for ESP32
category=Other
url=https://github.com/esphome/AsyncTCP.git
architectures=*
28 changes: 28 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[env]
framework = arduino
build_flags =
-Wall -Wextra
-D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file

[platformio]
lib_dir = .
src_dir = examples/ClientServer/Client

[env:arduino]
platform = espressif32
board = esp32dev

[env:arduino-2]
platform = [email protected]
board = esp32dev

[env:arduino-3]
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip
board = esp32dev
Loading

0 comments on commit 32961d3

Please sign in to comment.