OTA and Debug improvements (#445)
* Use esp_crt_bundle for HTTPS requests * Remove Solo1 support * Improve Nuki device config read functions * Webserial * OTA Improvements * WebCfg fixes * Debug improvements
This commit is contained in:
22
.github/workflows/beta.yml
vendored
22
.github/workflows/beta.yml
vendored
@@ -52,13 +52,12 @@ jobs:
|
||||
python3 resources/config_version.py beta
|
||||
- name: Build ${{ matrix.build }} PlatformIO Project ${{ matrix.board }}
|
||||
run: |
|
||||
ORIGBOARD="${BOARD}"
|
||||
if [ "$BUILD" = "debug" ]; then
|
||||
BOARD="${BOARD}_dbg"
|
||||
fi
|
||||
echo "::group::Building with PlatformIO"
|
||||
if [ "$BUILD" = "release" ]; then
|
||||
make updater_${BOARD}
|
||||
fi
|
||||
make updater_${ORIGBOARD}
|
||||
make $BOARD
|
||||
echo "::endgroup::"
|
||||
- name: Add flash script
|
||||
@@ -118,24 +117,39 @@ jobs:
|
||||
with:
|
||||
path: release
|
||||
pattern: '*-release-assets'
|
||||
- name: Download debug assets
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: debug
|
||||
pattern: '*-debug-assets'
|
||||
- name: Copy binaries to ota/beta
|
||||
env:
|
||||
Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
|
||||
run: |
|
||||
mkdir -p ota/beta/
|
||||
mkdir -p ota/debug/beta/
|
||||
mkdir -p ota/master/
|
||||
mkdir -p ota/debug/master/
|
||||
mkdir -p webflash/
|
||||
mkdir -p resources/
|
||||
mkdir -p src/
|
||||
cp -vf release/*/nuki_hub_*.bin ota/beta/
|
||||
cp -vf debug/*/nuki_hub_*.bin ota/debug/beta/
|
||||
cp -vf master/resources/ota_manifest.py resources/ota_manifest.py
|
||||
cp -vf master/src/Config.h src/Config.h
|
||||
python3 resources/ota_manifest.py beta $Version
|
||||
find * -not -path "ota*" -not -path "webflash*" -delete
|
||||
rm -rf .github .gitignore .gitmodules
|
||||
touch ota/beta/empty
|
||||
touch ota/master/empty
|
||||
touch ota/debug/beta/empty
|
||||
touch ota/debug/master/empty
|
||||
touch webflash/empty
|
||||
- name: Commit binaries to binary
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update binaries"
|
||||
file_pattern: 'ota/* ota/master/* ota/beta/* webflash/*'
|
||||
file_pattern: 'ota/* ota/debug/* ota/master/* ota/debug/master/* ota/beta/* ota/debug/beta/* webflash/*'
|
||||
branch: binary
|
||||
skip_dirty_check: true
|
||||
skip_fetch: true
|
||||
|
||||
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -57,13 +57,12 @@ jobs:
|
||||
sed -i "s/unknownbuildnr/$Version/g" src/Config.h
|
||||
- name: Build ${{ matrix.build }} PlatformIO Project ${{ matrix.board }}
|
||||
run: |
|
||||
ORIGBOARD="${BOARD}"
|
||||
if [ "$BUILD" = "debug" ]; then
|
||||
BOARD="${BOARD}_dbg"
|
||||
fi
|
||||
echo "::group::Building with PlatformIO"
|
||||
if [ "$BUILD" = "release" ]; then
|
||||
make updater_${BOARD}
|
||||
fi
|
||||
make updater_${ORIGBOARD}
|
||||
make $BOARD
|
||||
echo "::endgroup::"
|
||||
- name: Add flash script
|
||||
|
||||
34
.github/workflows/nightly.yml
vendored
34
.github/workflows/nightly.yml
vendored
@@ -12,19 +12,20 @@ jobs:
|
||||
name: Count commits in last 24h
|
||||
if: github.repository == 'technyon/nuki_hub'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
has-commits: ${{ steps.commits.outputs.NEW_COMMIT_COUNT }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Get new commits
|
||||
run: echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_ENV
|
||||
- name: Check if commits larger than 0
|
||||
if: ${{ env.NEW_COMMIT_COUNT < 1 }}
|
||||
run: exit 1
|
||||
id: commits
|
||||
run: echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
|
||||
build:
|
||||
name: Build ${{ matrix.board }} (${{ matrix.build }})
|
||||
needs: check-commits
|
||||
if: needs.check-commits.outputs.has-commits > 0
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -69,13 +70,12 @@ jobs:
|
||||
python3 resources/config_version.py master
|
||||
- name: Build ${{ matrix.build }} PlatformIO Project ${{ matrix.board }}
|
||||
run: |
|
||||
ORIGBOARD="${BOARD}"
|
||||
if [ "$BUILD" = "debug" ]; then
|
||||
BOARD="${BOARD}_dbg"
|
||||
fi
|
||||
echo "::group::Building with PlatformIO"
|
||||
if [ "$BUILD" = "release" ]; then
|
||||
make updater_${BOARD}
|
||||
fi
|
||||
make updater_${ORIGBOARD}
|
||||
make $BOARD
|
||||
echo "::endgroup::"
|
||||
- name: Add flash script
|
||||
@@ -109,7 +109,8 @@ jobs:
|
||||
path: ${{ matrix.build }}/${{ env.VARIANT }}
|
||||
ota-nightly:
|
||||
name: Create nightly from latest master
|
||||
needs: build
|
||||
needs: [check-commits, build]
|
||||
if: needs.check-commits.outputs.has-commits > 0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Git Checkout
|
||||
@@ -135,26 +136,39 @@ jobs:
|
||||
with:
|
||||
path: release
|
||||
pattern: '*-release-assets'
|
||||
- name: Download debug assets
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: debug
|
||||
pattern: '*-debug-assets'
|
||||
- name: Copy binaries to ota/master
|
||||
env:
|
||||
Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
|
||||
run: |
|
||||
mkdir -p ota/master/
|
||||
mkdir -p ota/beta/
|
||||
mkdir -p ota/debug/beta/
|
||||
mkdir -p ota/master/
|
||||
mkdir -p ota/debug/master/
|
||||
mkdir -p webflash/
|
||||
mkdir -p resources/
|
||||
mkdir -p src/
|
||||
cp -vf release/*/nuki_hub_*.bin ota/master/
|
||||
cp -vf debug/*/nuki_hub_*.bin ota/debug/master/
|
||||
cp -vf master/resources/ota_manifest.py resources/ota_manifest.py
|
||||
cp -vf master/src/Config.h src/Config.h
|
||||
python3 resources/ota_manifest.py master $Version
|
||||
find * -not -path "ota*" -not -path "webflash*" -delete
|
||||
rm -rf .github .gitignore .gitmodules
|
||||
touch ota/beta/empty
|
||||
touch ota/master/empty
|
||||
touch ota/debug/beta/empty
|
||||
touch ota/debug/master/empty
|
||||
touch webflash/empty
|
||||
- name: Commit binaries to binary
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update binaries"
|
||||
file_pattern: 'ota/* ota/master/* ota/beta/* webflash/*'
|
||||
file_pattern: 'ota/* ota/debug/* ota/master/* ota/debug/master/* ota/beta/* ota/debug/beta/* webflash/*'
|
||||
branch: binary
|
||||
skip_dirty_check: true
|
||||
skip_fetch: true
|
||||
|
||||
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@@ -51,13 +51,12 @@ jobs:
|
||||
sed -i "s/unknownbuildnr/$Version/g" src/Config.h
|
||||
- name: Build ${{ matrix.build }} PlatformIO Project ${{ matrix.board }}
|
||||
run: |
|
||||
ORIGBOARD="${BOARD}"
|
||||
if [ "$BUILD" = "debug" ]; then
|
||||
BOARD="${BOARD}_dbg"
|
||||
fi
|
||||
echo "::group::Building with PlatformIO"
|
||||
if [ "$BUILD" = "release" ]; then
|
||||
make updater_${BOARD}
|
||||
fi
|
||||
make updater_${ORIGBOARD}
|
||||
make $BOARD
|
||||
echo "::endgroup::"
|
||||
- name: Add flash script
|
||||
@@ -181,10 +180,15 @@ jobs:
|
||||
env:
|
||||
Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
|
||||
run: |
|
||||
mkdir -p ota/
|
||||
mkdir -p ota/beta/
|
||||
mkdir -p ota/debug/beta/
|
||||
mkdir -p ota/master/
|
||||
mkdir -p ota/debug/master/
|
||||
mkdir -p webflash/
|
||||
mkdir -p resources/
|
||||
mkdir -p src/
|
||||
cp -vf release/*/nuki_hub_*.bin ota/
|
||||
cp -vf debug/*/nuki_hub_*.bin ota/debug/
|
||||
cp -vf release/*/webflash_nuki_hub_*.bin webflash/
|
||||
cp -vf master/resources/ota_manifest.py resources/ota_manifest.py
|
||||
cp -vf master/src/Config.h src/Config.h
|
||||
@@ -192,12 +196,18 @@ jobs:
|
||||
python3 resources/ota_manifest.py beta none
|
||||
find * -not -path "ota*" -not -path "webflash*" -delete
|
||||
rm -rf ota/beta/*.bin
|
||||
rm -rf ota/debug/beta/*.bin
|
||||
rm -rf .github .gitignore .gitmodules
|
||||
touch ota/beta/empty
|
||||
touch ota/master/empty
|
||||
touch ota/debug/beta/empty
|
||||
touch ota/debug/master/empty
|
||||
touch webflash/empty
|
||||
- name: Commit binaries to binary
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update binaries"
|
||||
file_pattern: 'ota/* ota/master/* webflash/*'
|
||||
file_pattern: 'ota/* ota/debug/* ota/master/* ota/debug/master/* ota/beta/* ota/debug/beta/* webflash/*'
|
||||
branch: binary
|
||||
skip_dirty_check: true
|
||||
skip_fetch: true
|
||||
|
||||
Reference in New Issue
Block a user