From a63694b33f3c8bf22a8854f75dc9fc39eb33f068 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Fri, 6 Sep 2024 11:50:04 +0200 Subject: [PATCH] update CI --- .github/workflows/ci.yml | 99 ++++++++++++++++++++++++---------------- .gitpod.yml | 2 +- platformio.ini | 85 +++++++++++++++++++--------------- 3 files changed, 108 insertions(+), 78 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1e3c27..45ff7f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,58 +77,77 @@ jobs: - name: Build StreamFiles run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/StreamFiles/StreamFiles.ino" - pio_envs: - name: Get PlatformIO Envs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - key: pip - path: ~/.cache/pip - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install PlatformIO - run: | - python -m pip install --upgrade pip - pip install --upgrade platformio - - name: Get Envs - id: envs - run: | - echo "pio_default_envs=$(pio project config --json-output | jq -cr '[ .[][0] | select(startswith("env:") and (endswith("-debug")|not)) | .[4:] ]')" >> $GITHUB_OUTPUT - - outputs: - pio_default_envs: ${{ steps.envs.outputs.pio_default_envs }} - platformio: - name: "pio:${{ matrix.environment }}" - needs: [pio_envs] + name: "pio:${{ matrix.env }}:${{ matrix.board }}" runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - environment: ${{ fromJSON(needs.pio_envs.outputs.pio_default_envs) }} + include: + - env: ci-arduino-2 + board: esp32dev + - env: ci-arduino-2 + board: esp32-s2-saola-1 + - env: ci-arduino-2 + board: esp32-s3-devkitc-1 + - 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 + - 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 + - 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 + + - env: ci-esp8266 + board: huzzah + - env: ci-esp8266 + board: d1_mini + + - env: ci-raspberrypi + board: rpipicow steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache PlatformIO + uses: actions/cache@v4 with: + key: ${{ runner.os }}-pio path: | - ~/.platformio ~/.cache/pip - key: pio - - uses: actions/setup-python@v5 + ~/.platformio + + - name: Python + uses: actions/setup-python@v5 with: python-version: "3.x" - - run: pip install platformio - - name: Install platformio + - name: Build run: | python -m pip install --upgrade pip pip install --upgrade platformio - - - run: PLATFORMIO_SRC_DIR=examples/CaptivePortal pio run -e ${{ matrix.environment }} - - run: PLATFORMIO_SRC_DIR=examples/SimpleServer pio run -e ${{ matrix.environment }} - - run: PLATFORMIO_SRC_DIR=examples/Filters pio run -e ${{ matrix.environment }} - - run: PLATFORMIO_SRC_DIR=examples/StreamFiles pio run -e ${{ matrix.environment }} + + - run: PLATFORMIO_SRC_DIR=examples/CaptivePortal PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }} + - run: PLATFORMIO_SRC_DIR=examples/SimpleServer PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }} + - run: PLATFORMIO_SRC_DIR=examples/Filters PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }} + - run: PLATFORMIO_SRC_DIR=examples/StreamFiles PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }} diff --git a/.gitpod.yml b/.gitpod.yml index 74917c2..2f8a443 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -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 diff --git a/platformio.ini b/platformio.ini index b72ac65..051c4ca 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,3 +1,13 @@ +[platformio] +default_envs = arduino-2, arduino-3, arduino-310rc1, esp8266, raspberrypi +lib_dir = . +; src_dir = examples/CaptivePortal +src_dir = examples/SimpleServer +; src_dir = examples/StreamFiles +; src_dir = examples/Filters +; src_dir = examples/Draft +; src_dir = examples/issues/Issue14 + [env] framework = arduino build_flags = @@ -13,36 +23,30 @@ build_flags = upload_protocol = esptool monitor_speed = 115200 monitor_filters = esp32_exception_decoder, log2file - -[platformio] -lib_dir = . -; src_dir = examples/CaptivePortal -src_dir = examples/SimpleServer -; src_dir = examples/StreamFiles -; src_dir = examples/Filters -; src_dir = examples/Draft -; src_dir = examples/issues/Issue14 +lib_deps = + bblanchon/ArduinoJson @ 7.1.0 + mathieucarbou/AsyncTCP @ 3.2.5 +lib_compat_mode = strict +lib_ldf_mode = chain +board = esp32dev [env:arduino-2] platform = espressif32@6.8.1 -board = esp32dev -lib_deps = - bblanchon/ArduinoJson @ 7.1.0 - mathieucarbou/AsyncTCP @ 3.2.5 [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 -lib_deps = - bblanchon/ArduinoJson @ 7.1.0 - mathieucarbou/AsyncTCP @ 3.2.5 +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 [env:esp8266] platform = espressif8266 board = huzzah +; board = d1_mini lib_deps = bblanchon/ArduinoJson @ 7.1.0 esphome/ESPAsyncTCP-esphome @ 2.0.0 @@ -51,7 +55,7 @@ lib_deps = ; https://github.com/platformio/platform-raspberrypi/pull/36 ; https://github.com/earlephilhower/arduino-pico/blob/master/docs/platformio.rst ; board settings: https://github.com/earlephilhower/arduino-pico/blob/master/tools/json/rpipico.json -[env:rpipicow] +[env:raspberrypi] upload_protocol = picotool platform = https://github.com/maxgerhardt/platform-raspberrypi.git board = rpipicow @@ -59,23 +63,30 @@ lib_deps = bblanchon/ArduinoJson @ 7.1.0 khoih-prog/AsyncTCP_RP2040W @ 1.2.0 -[env:pioarduino-esp32dev] -platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip -board = esp32dev -lib_deps = - bblanchon/ArduinoJson @ 7.1.0 - mathieucarbou/AsyncTCP @ 3.2.5 +; CI -[env:pioarduino-c6] -platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip -board = esp32-c6-devkitc-1 -lib_deps = - bblanchon/ArduinoJson @ 7.1.0 - mathieucarbou/AsyncTCP @ 3.2.5 +[env:ci-arduino-2] +platform = espressif32@6.8.1 +board = ${sysenv.PIO_BOARD} -[env:pioarduino-h2] +[env:ci-arduino-3] platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip -board = esp32-h2-devkitm-1 +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} + +[env:ci-esp8266] +platform = espressif8266 +board = ${sysenv.PIO_BOARD} lib_deps = bblanchon/ArduinoJson @ 7.1.0 - mathieucarbou/AsyncTCP @ 3.2.5 + esphome/ESPAsyncTCP-esphome @ 2.0.0 + +[env:ci-raspberrypi] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git +board = ${sysenv.PIO_BOARD} +lib_deps = + bblanchon/ArduinoJson @ 7.1.0 + khoih-prog/AsyncTCP_RP2040W @ 1.2.0