mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
Merge remote-tracking branch 'letscontrolit/mega' into bugfix/WiFi_state_machine
This commit is contained in:
@@ -27,15 +27,12 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
|
||||
- name: Build documentation
|
||||
run: |
|
||||
cd docs
|
||||
sudo apt install imagemagick zip
|
||||
pip install -r requirements.txt
|
||||
pip install uv
|
||||
uv pip install --system -r requirements.txt
|
||||
python ./builds_overview.py
|
||||
make html
|
||||
cd ..
|
||||
@@ -55,7 +52,8 @@ jobs:
|
||||
python-version: '3.x'
|
||||
- id: set-matrix
|
||||
run: |
|
||||
pip install platformio
|
||||
pip install uv
|
||||
uv pip install --system platformio
|
||||
python tools/ci/generate-matrix.py
|
||||
|
||||
build:
|
||||
@@ -68,27 +66,12 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
|
||||
- uses: actions/cache@v4
|
||||
if: ${{ contains(matrix.env, 'esp32') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }}
|
||||
- uses: actions/cache@v4
|
||||
if: ${{ contains(matrix.env, 'esp8266') }}
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-esp8266-${{ hashFiles('platformio*.ini') }}
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install binutils build-essential libffi-dev libgit2-dev
|
||||
pip3 install --upgrade pip
|
||||
pip install wheel
|
||||
pip install -r requirements.txt
|
||||
pip install uv
|
||||
uv pip install --system -r requirements.txt
|
||||
pio pkg update -e ${{ matrix.env }}
|
||||
- name: Get current date
|
||||
id: date
|
||||
@@ -122,10 +105,6 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: |
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@
|
||||
#define DEFAULT_PIN_RESET_BUTTON (-1)
|
||||
|
||||
|
||||
#define DEFAULT_USE_RULES false // (true|false) Enable Rules?
|
||||
#define DEFAULT_USE_RULES true // (true|false) Enable Rules?
|
||||
#define DEFAULT_RULES_OLDENGINE true
|
||||
|
||||
#define DEFAULT_MQTT_RETAIN false // (true|false) Retain MQTT messages?
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_USE_RULES
|
||||
#define DEFAULT_USE_RULES false // (true|false) Enable Rules?
|
||||
#define DEFAULT_USE_RULES true // (true|false) Enable Rules?
|
||||
#endif
|
||||
#ifndef DEFAULT_RULES_OLDENGINE
|
||||
#define DEFAULT_RULES_OLDENGINE true
|
||||
|
||||
+13
-16
@@ -21,21 +21,15 @@ Import("env")
|
||||
platform = env.PioPlatform()
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
from os.path import join
|
||||
|
||||
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
|
||||
import esptool
|
||||
|
||||
def esptool_call(cmd):
|
||||
try:
|
||||
esptool.main(cmd)
|
||||
except SystemExit as e:
|
||||
# Fetch sys.exit() without leaving the script
|
||||
if e.code == 0:
|
||||
return True
|
||||
else:
|
||||
print(f"❌ esptool failed with exit code: {e.code}")
|
||||
return False
|
||||
def normalize_paths(cmd):
|
||||
for i, arg in enumerate(cmd):
|
||||
if isinstance(arg, str) and '/' in arg:
|
||||
cmd[i] = os.path.normpath(arg)
|
||||
return cmd
|
||||
|
||||
def esp32_create_combined_bin(source, target, env):
|
||||
print("Generating combined binary for serial flashing")
|
||||
@@ -75,9 +69,12 @@ def esp32_create_combined_bin(source, target, env):
|
||||
print(f" - {hex(app_offset)} | {firmware_name}")
|
||||
cmd += [hex(app_offset), firmware_name]
|
||||
|
||||
print('Using esptool.py arguments: %s' % ' '.join(cmd))
|
||||
|
||||
esptool_call(cmd)
|
||||
# print('Using esptool.py arguments: %s' % ' '.join(cmd))
|
||||
cmdline = [env.subst("$OBJCOPY")] + normalize_paths(cmd)
|
||||
print('Command Line: %s' % cmdline)
|
||||
result = subprocess.run(cmdline, text=True, check=False, stdout=subprocess.DEVNULL)
|
||||
if result.returncode != 0:
|
||||
print(f"esptool create firmware failed with exit code: {result.returncode}")
|
||||
|
||||
|
||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin)
|
||||
|
||||
Reference in New Issue
Block a user