Skip to content

Commit

Permalink
Merge pull request #15 from vortigont/libdeps
Browse files Browse the repository at this point in the history
platformio manifest and lib deps updates
  • Loading branch information
vortigont authored Jun 21, 2024
2 parents 81f3738 + 2e952c3 commit 5688b4f
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 127 deletions.
48 changes: 34 additions & 14 deletions .github/workflows/pio_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
example:
- "examples/asyncserver-flashz"
- "examples/httpserver-flashz"
#strategy:
# matrix:
# example:
# - "examples/asyncserver-flashz"
# - "examples/httpserver-flashz"

steps:
- uses: actions/checkout@v4
Expand All @@ -36,11 +36,6 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
Expand All @@ -50,9 +45,34 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade platformio
#pio update
- name: Run PlatformIO
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}
- name: Prepare examples for local build
run: |
cd ${{ matrix.example }} && platformio run -e flashz -e flashz_debug
pwd
#ls -l
mkdir ~/wrk
mv examples/asyncserver-flashz ~/wrk/
mv examples/httpserver-flashz ~/wrk/
mkdir -p ~/wrk/asyncserver-flashz/lib/esp32-flashz ~/wrk/httpserver-flashz/lib/esp32-flashz
cp -r ./src ~/wrk/asyncserver-flashz/lib/esp32-flashz
cp -r ./src ~/wrk/httpserver-flashz/lib/esp32-flashz
cp library.json ~/wrk/asyncserver-flashz/lib/esp32-flashz/
cp library.json ~/wrk/httpserver-flashz/lib/esp32-flashz/
ls -l ~/wrk/
#cd ${{ matrix.example }} && platformio run -e flashz -e flashz_debug
#pio ci -c ${{ matrix.example }}/platformio.ini
- name: Run Build for Async server
#env:
# PLATFORMIO_CI_SRC: ${{ matrix.example }}
run: |
cd ~/wrk/asyncserver-flashz
platformio run -e esp32 -e esp32-s2 -e esp32c3
cd ~/wrk/httpserver-flashz
platformio run -e esp32 -e esp32-s2 -e esp32c3
#cd ${{ matrix.example }} && platformio run -e flashz -e flashz_debug
#pio ci -c ${{ matrix.example }}/platformio.ini
- name: Run Build for HTTP Server
#env:
# PLATFORMIO_CI_SRC: ${{ matrix.example }}
run: |
cd ~/wrk/httpserver-flashz
platformio run -e esp32 -e esp32-s2 -e esp32c3
34 changes: 34 additions & 0 deletions .github/workflows/tg_rel_notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Telegram notification sender

# https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a
# https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id
# https://stackoverflow.com/questions/75283870/how-to-send-telegram-message-to-a-topic-thread

# GH release API https://docs.github.com/en/rest/releases/releases

name: Telegram - Published Release notification
on:
#workflow_dispatch: # Manual start
release:
types: [published]

jobs:
build:
name: Send Message
runs-on: ubuntu-latest
steps:
- name: send Telegram Message about release
uses: Ofceab-Studio/telegram-action@1.0.1
with:
#to: ${{ secrets.TG_BOT_MYCHAT }}
to: ${{ secrets.LAMPDEVS_GID }}
thread_id: ${{ secrets.LAMPDEVS_ANNOUNCE_TOPIC_ID }}
token: ${{ secrets.LAMPDEVS_BOT_TOKEN }}
disable_web_page_preview: true
disable_notification: true
message: |
<b>Новый выпуск:</b>
<a href="${{ github.event.release.html_url }}">${{ github.repository }}</a> <b>${{ github.event.release.tag_name }}</b>
${{ github.event.release.body }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v 1.1.5 (2024-06-21)
- minor fixups
- remove internal arduino's libs dependency from manifest
- pio_build workflows use local lib to build examples
* add release announce via Telegram bot

## v 1.1.4 (2024-05-28)
* fixes for arduino-esp32 3.x.x (thanks to @tobozo)

Expand Down
57 changes: 5 additions & 52 deletions examples/asyncserver-flashz-pakojs/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
[platformio]
default_envs = flashz
extra_configs =
user_*.ini

[common]
[env]
framework = arduino
platform = espressif32
board = wemos_d1_mini32
board_build.filesystem = littlefs
lib_ldf_mode = chain+
lib_deps =
me-no-dev/AsyncTCP
https://github.com/me-no-dev/ESPAsyncWebServer
https://github.com/vortigont/esp32-flashz#v1.1.1
mathieucarbou / ESP Async WebServer
vortigont / esp32-flashz
build_flags =
-D FZ_WITH_ASYNCSRV
-D NO_GLOBAL_UPDATE
-D BUILD_ENV=$PIOENV
upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
extra_scripts =
Expand All @@ -26,55 +24,10 @@ build_flags =
-DCORE_DEBUG_LEVEL=5
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG

[env]
extends = common

; default Arduino ESP32
[env:flashz]
extends = env
build_flags =
${env.build_flags}
-DCORE_DEBUG_LEVEL=3
-DLOG_LOCAL_LEVEL=ESP_LOG_INFO

; build lib with lot's of debug enabled
[env:flashz_debug]
extends = env
build_flags =
${env.build_flags}
${debug.build_flags}

; this target will copress and do OTA upload to specified URL
[env:flashz_ota]
extends = env
upload_protocol = custom
; replace url with address of your esp32 device
upload_port = http://192.168.1.25/update
; compress image before uploading
upload_flags = compress
build_flags =
${env.build_flags}
-DCORE_DEBUG_LEVEL=3
-DLOG_LOCAL_LEVEL=ESP_LOG_INFO

; ESP32-S2 platform (for CI testing)
[env:esp32-s2]
extends = env
board = featheresp32-s2
; board = ttgo-t8-esp32-s2
; board_build.flash_mode = qio
build_flags =
${env.build_flags}
${debug.build_flags}

; ESP32-c3 risc-v platform (for CI testing)
[env:esp32c3]
extends = env
board = ttgo-t-oi-plus
lib_deps =
me-no-dev/AsyncTCP
https://github.com/vortigont/ESPAsyncWebServer#hotfixes
https://github.com/vortigont/esp32-flashz
build_flags =
${env.build_flags}
${debug.build_flags}
44 changes: 18 additions & 26 deletions examples/asyncserver-flashz/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[platformio]
default_envs = flashz
extra_configs =
user_*.ini

[common]
[env]
framework = arduino
platform = espressif32
board = wemos_d1_mini32
board_build.filesystem = littlefs
lib_ldf_mode = chain+
lib_deps =
me-no-dev/AsyncTCP
https://github.com/me-no-dev/ESPAsyncWebServer
symlink://../../
;https://github.com/vortigont/esp32-flashz#v1.1.1
mathieucarbou / ESP Async WebServer
vortigont / esp32-flashz
build_flags =
-D FZ_WITH_ASYNCSRV
-D NO_GLOBAL_UPDATE
-D BUILD_ENV=$PIOENV
upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
extra_scripts =
Expand All @@ -28,9 +24,6 @@ build_flags =
-DCORE_DEBUG_LEVEL=5
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG

[env]
extends = common

; default Arduino ESP32
[env:flashz]
extends = env
Expand All @@ -46,7 +39,7 @@ build_flags =
${env.build_flags}
${debug.build_flags}

; this target will copress and do OTA upload to specified URL
; this target will compress and do OTA upload to specified URL
[env:flashz_ota]
extends = env
upload_protocol = custom
Expand All @@ -59,24 +52,23 @@ build_flags =
-DCORE_DEBUG_LEVEL=3
-DLOG_LOCAL_LEVEL=ESP_LOG_INFO

; ESP32-S2 platform (for CI testing)
[env:esp32-s2]
extends = env
board = featheresp32-s2
; board = ttgo-t8-esp32-s2
; board_build.flash_mode = qio


; envs below is needed only for CI test build, pls do not use it
[env:esp32]
extends = env:flashz
lib_deps =
mathieucarbou / ESP Async WebServer
build_flags =
${env.build_flags}
${debug.build_flags}

; ESP32-S2 platform (for CI testing)
[env:esp32-s2]
extends = env:esp32
board = featheresp32-s2

; ESP32-c3 risc-v platform (for CI testing)
[env:esp32c3]
extends = env
extends = env:esp32
board = ttgo-t-oi-plus
lib_deps =
me-no-dev/AsyncTCP
https://github.com/vortigont/ESPAsyncWebServer#hotfixes
https://github.com/vortigont/esp32-flashz
build_flags =
${env.build_flags}
${debug.build_flags}
36 changes: 16 additions & 20 deletions examples/httpserver-flashz/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
[platformio]
default_envs = flashz
extra_configs =
user_*.ini

[common]
[env]
framework = arduino
platform = espressif32
board = wemos_d1_mini32
board_build.filesystem = littlefs
lib_ldf_mode = chain+
lib_deps =
symlink://../../
;https://github.com/vortigont/esp32-flashz#v1.1.1
vortigont / esp32-flashz
build_flags =
-D NO_GLOBAL_UPDATE
-D BUILD_ENV=$PIOENV
upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
extra_scripts =
Expand All @@ -25,9 +22,6 @@ build_flags =
-DCORE_DEBUG_LEVEL=5
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG

[env]
extends = common

; default Arduino ESP32
[env:flashz]
extends = env
Expand All @@ -43,7 +37,7 @@ build_flags =
${env.build_flags}
${debug.build_flags}

; this target will copress and do OTA upload to specified URL
; this target will compress and do OTA upload to specified URL
[env:flashz_ota]
extends = env
upload_protocol = custom
Expand All @@ -56,20 +50,22 @@ build_flags =
-DCORE_DEBUG_LEVEL=3
-DLOG_LOCAL_LEVEL=ESP_LOG_INFO

; ESP32-S2 platform (for CI testing)
[env:esp32-s2]
extends = env
board = featheresp32-s2
; board = ttgo-t8-esp32-s2
; board_build.flash_mode = qio

; envs below is needed only for CI test build, pls do not use it
[env:esp32]
extends = env:flashz
lib_deps =

build_flags =
${env.build_flags}
${debug.build_flags}

; ESP32-S2 platform (for CI testing)
[env:esp32-s2]
extends = env:esp32
board = featheresp32-s2

; ESP32-c3 risc-v platform (for CI testing)
[env:esp32c3]
extends = env
extends = env:esp32
board = ttgo-t-oi-plus
build_flags =
${env.build_flags}
${debug.build_flags}
7 changes: 1 addition & 6 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "esp32-flashz",
"frameworks": "arduino",
"platforms": ["espressif32"],
"version": "1.1.4",
"version": "1.1.5",
"keywords": "ota, zlib, esp32",
"description": "ESP32-FlashZ - an arduino library that provides zlib compressed OTA update feature for esp32",
"url": "https://github.com/vortigont/esp32-flashz",
Expand All @@ -19,11 +19,6 @@
"type": "git",
"url": "https://github.com/vortigont/esp32-flashz.git"
},
"dependencies":
[
{"name": "Update", "platforms": "espressif32"},
{"name": "Ticker", "platforms": "espressif32"}
],
"build": { "libCompatMode": "strict", "lib_ldf_mode":"off" },
"export": {
"include":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=esp32-flashz
version=1.1.4
version=1.1.5
author=Emil Muratov
maintainer=Emil Muratov
sentence=ESP32-FlashZ arduino library
Expand Down
Loading

0 comments on commit 5688b4f

Please sign in to comment.