From a99c36ec71f35fa6f68c61b13ee0e7b59aa4eaf2 Mon Sep 17 00:00:00 2001 From: tobozo Date: Wed, 10 Jan 2024 16:24:23 +0000 Subject: [PATCH] 1.2.1 (#71) * added platformio CI tests --- .../{LibraryBuild.yml => ArduinoBuild.yml} | 6 +- .github/workflows/PlatformioBuild.yml | 68 +++++++++++++++++++ examples/Test_platformio/platformio.ini | 24 +++++-- examples/Test_platformio/src/main.cpp | 7 +- library.properties | 2 +- 5 files changed, 98 insertions(+), 9 deletions(-) rename .github/workflows/{LibraryBuild.yml => ArduinoBuild.yml} (97%) create mode 100644 .github/workflows/PlatformioBuild.yml diff --git a/.github/workflows/LibraryBuild.yml b/.github/workflows/ArduinoBuild.yml similarity index 97% rename from .github/workflows/LibraryBuild.yml rename to .github/workflows/ArduinoBuild.yml index 44a0bb4..445697a 100644 --- a/.github/workflows/LibraryBuild.yml +++ b/.github/workflows/ArduinoBuild.yml @@ -1,12 +1,14 @@ -name: LibraryBuild +name: ArduinoBuild on: push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request paths: - '**.ino' - '**.cpp' - '**.h' - - '**LibraryBuild.yml' + - '**ArduinoBuild.yml.yml' pull_request: + workflow_dispatch: + jobs: build: name: ${{ matrix.arduino-boards-fqbn }} - test compiling examples diff --git a/.github/workflows/PlatformioBuild.yml b/.github/workflows/PlatformioBuild.yml new file mode 100644 index 0000000..f38f766 --- /dev/null +++ b/.github/workflows/PlatformioBuild.yml @@ -0,0 +1,68 @@ +name: PlatformIOBuild + +env: + PROJECT_DIR: examples/Test_platformio + +on: + push: + paths: + - '**.ino' + - '**.cpp' + - '**.hpp' + - '**.h' + - '**.c' + - '**PlatformioBuild.yml' + pull_request: + workflow_dispatch: + +jobs: + build: + name: ${{ matrix.pio-env }} + + runs-on: ubuntu-latest + + strategy: + matrix: + pio-env: + - esp8266 + - esp32 + - esp32s3 + - pico + + fail-fast: false + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v3 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + + - name: Run PlatformIO + + run: | + cd ${{ env.PROJECT_DIR }} + pio pkg install -e ${{ matrix.pio-env }} --no-save --library file://$(realpath ../../) + pio run -e ${{ matrix.pio-env }} + diff --git a/examples/Test_platformio/platformio.ini b/examples/Test_platformio/platformio.ini index 6c8f52e..c783ee1 100644 --- a/examples/Test_platformio/platformio.ini +++ b/examples/Test_platformio/platformio.ini @@ -9,12 +9,26 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = nodemcu +default_envs = esp8266 +[env] +framework = arduino +lib_deps = ESP32-targz -[env:nodemcu] +[env:esp8266] platform = espressif8266 board = nodemcu -framework = arduino -lib_deps = - https://github.com/tobozo/ESP32-targz#1.1.8 + + +[env:esp32] +platform = espressif32 +board = esp32dev + +[env:esp32s3] +platform = espressif32 +board = esp32-s3-devkitc-1 + +[env:pico] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git +board = pico +board_build.core = earlephilhower diff --git a/examples/Test_platformio/src/main.cpp b/examples/Test_platformio/src/main.cpp index a4f1a8f..23644c5 100644 --- a/examples/Test_platformio/src/main.cpp +++ b/examples/Test_platformio/src/main.cpp @@ -1,8 +1,13 @@ +#define DEST_FS_USES_SD + #include void setup() { - + if( !tarGzFS.begin() ) { + Serial.println("Could not start filesystem"); + while(1) yield(); + } } diff --git a/library.properties b/library.properties index bcf404a..8f7da64 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP32-targz -version=1.2.0 +version=1.2.1 author=tobozo maintainer=tobozo sentence=A library to unpack/uncompress tar, gz, and tar.gz files on ESP32 and ESP8266