Skip to content

Commit

Permalink
Update CI and versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Sep 6, 2024
1 parent 89ec55d commit 5e7d930
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 76 deletions.
92 changes: 54 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,76 +99,92 @@ jobs:
run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/CallbackAsync/CallbackAsync.ino" --build-property build.extra_flags=-DMYCILA_JSON_SUPPORT

platformio:
name: pio ${{ matrix.name }}
needs: cpplint
name: "pio:${{ matrix.env }}:${{ matrix.board }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: esp32dev|arduino
board: esp32dev
platform: espressif32
opts:
- name: esp32dev|arduino-2
- env: ci-arduino-2
board: esp32dev
platform: [email protected]
opts:
- name: esp32dev|arduino-3
board: esp32dev
platform: espressif32
opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.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:
- 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:
- 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-3
board: esp32-h2-devkitm-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 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip'"
- env: ci-arduino-310rc1
board: esp32-c3-devkitc-02
- env: ci-arduino-310rc1
board: esp32-c6-devkitc-1
- env: ci-arduino-310rc1
board: esp32-h2-devkitm-1

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 }}

- name: Build
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build Read
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/Read/Read.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/Read" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build ReadAsync
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/ReadAsync/ReadAsync.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/ReadAsync" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build EnergyReset
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/EnergyReset/EnergyReset.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/EnergyReset" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build EnergyResetAsync
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/EnergyResetAsync/EnergyResetAsync.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/EnergyResetAsync" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build SetSpeed
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/SetSpeed/SetSpeed.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/SetSpeed" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build PerfTest1
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/PerfTest1/PerfTest1.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/PerfTest1" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build PerfTest2
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/PerfTest2/PerfTest2.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/PerfTest2" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build Callback
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/Callback/Callback.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/Callback" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}

- name: Build CallbackAsync
run: PLATFORMIO_BUILD_FLAGS="-Wall -Wextra -DMYCILA_JSON_SUPPORT" platformio ci "examples/CallbackAsync/CallbackAsync.ino" -l '.' --project-option="lib_deps=bblanchon/ArduinoJson" -b ${{ matrix.board }} ${{ matrix.opts }}
run: PLATFORMIO_SRC_DIR="examples/CallbackAsync" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- command: pip install --upgrade pip && pip install -U platformio && platformio run -e arduino-3
- command: pip install --upgrade pip && pip install -U platformio && platformio run

image:
file: .gitpod.Dockerfile
Expand Down
9 changes: 3 additions & 6 deletions examples/RemoteUDP/Listener/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[env]
framework = arduino
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
monitor_filters = esp32_exception_decoder, log2file
monitor_speed = 115200
upload_protocol = esptool
Expand All @@ -24,10 +21,10 @@ lib_deps =
robtillaart/CRC @ 1.0.3
mathieucarbou/AsyncTCP @ 3.2.5
mathieucarbou/ESPAsyncWebServer @ 3.2.4
mathieucarbou/MycilaESPConnect @ 5.0.2
mathieucarbou/MycilaESPConnect @ 5.0.3
mathieucarbou/MycilaJSY @ 9.1.6
mathieucarbou/MycilaLogger @ 3.2.0
mathieucarbou/MycilaSystem @ 3.0.1
mathieucarbou/MycilaSystem @ 3.0.2
mathieucarbou/MycilaTaskManager @ 3.1.2
mathieucarbou/MycilaTaskMonitor @ 3.0.1
mathieucarbou/MycilaUtilities @ 1.3.7
Expand Down
9 changes: 3 additions & 6 deletions examples/RemoteUDP/Sender/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[env]
framework = arduino
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
monitor_filters = esp32_exception_decoder, log2file
monitor_speed = 115200
upload_protocol = esptool
Expand All @@ -24,10 +21,10 @@ lib_deps =
bblanchon/ArduinoJson @ 7.1.0
mathieucarbou/AsyncTCP @ 3.2.5
mathieucarbou/ESPAsyncWebServer @ 3.2.4
mathieucarbou/MycilaESPConnect @ 5.0.2
mathieucarbou/MycilaESPConnect @ 5.0.3
mathieucarbou/MycilaJSY @ 9.1.6
mathieucarbou/MycilaLogger @ 3.2.0
mathieucarbou/MycilaSystem @ 3.0.1
mathieucarbou/MycilaSystem @ 3.0.2
mathieucarbou/MycilaTaskManager @ 3.1.2
mathieucarbou/MycilaTaskMonitor @ 3.0.1
mathieucarbou/MycilaUtilities @ 1.3.7
Expand Down
64 changes: 39 additions & 25 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
[env]
framework = arduino
build_flags =
-std=c++17
-std=gnu++17
-Wall -Wextra
-D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-D MYCILA_JSON_SUPPORT
-D MYCILA_JSY_DEBUG
lib_deps = bblanchon/ArduinoJson @ 7.1.0
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file
build_unflags =
-std=gnu++11

[platformio]
default_envs = arduino-2, arduino-3, arduino-310rc1
lib_dir = .

; src_dir = examples/EnergyReset
Expand All @@ -38,17 +22,47 @@ src_dir = examples/SetSpeed2
; src_dir = examples/raw/RawRead4
; src_dir = examples/raw/RawRead5

[env:arduino]
platform = espressif32
[env]
framework = arduino
board = esp32dev
build_flags =
-std=c++17
-std=gnu++17
-Wall -Wextra
-D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-D MYCILA_JSON_SUPPORT
-D MYCILA_JSY_DEBUG
lib_deps = bblanchon/ArduinoJson @ 7.1.0
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file
build_unflags =
-std=gnu++11

[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.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
; board = esp32-s3-devkitc-1
; board = esp32-c6-devkitc-1

[env:arduino-310rc1]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10%%2Brc1/platform-espressif32.zip
; board = esp32-s3-devkitc-1
; board = esp32-c6-devkitc-1

; 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.04/platform-espressif32.zip
board = ${sysenv.PIO_BOARD}

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

0 comments on commit 5e7d930

Please sign in to comment.