From bb3a263507598dbe9fb306f1ec80ff2809f99b7b Mon Sep 17 00:00:00 2001 From: Markus Kirberg Date: Tue, 14 May 2024 21:00:11 +0200 Subject: [PATCH 1/3] split github workflows --- .github/workflows/build.yaml | 32 +++++++++++++++++++++++++++ .github/workflows/check-format.yaml | 14 ++++++++++++ .github/workflows/shelly-homekit.yaml | 30 ------------------------- 3 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/check-format.yaml delete mode 100644 .github/workflows/shelly-homekit.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..cc911d61 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,32 @@ +name: build-shelly-homekit +on: + push: + pull_request: +jobs: + build: + name: Build ${{ matrix.model }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + model: [Shelly1, Shelly1L, Shelly1PM, Shelly25, Shelly2, ShellyColorBulb, ShellyDuo, ShellyI3, ShellyPlug, ShellyPlugS, ShellyPlus1, ShellyPlus1PM, ShellyPlusI4, ShellyRGBW2, ShellyVintage, ShellyUNI] + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build docker image # remove if newer mos docker image is available + if: ${{ contains( matrix.model , 'Plus') }} + run: docker build -t mgos/esp32-build:4.4.1-r7 -f .github/workflows/Dockerfile-esp32-build . + - name: Install mos build tool + run: | + sudo add-apt-repository -y ppa:mongoose-os/mos + sudo apt -q install -y mos-latest + - name: Build + run: make ${{ matrix.model }} RELEASE=1 RELEASE_SUFFIX=$(.github/version.py --suffix) + - name: Upload firmware artifacts + uses: actions/upload-artifact@v3 + with: + name: releases + path: releases/**/shelly-homekit-${{ matrix.model }}.zip + if-no-files-found: warn diff --git a/.github/workflows/check-format.yaml b/.github/workflows/check-format.yaml new file mode 100644 index 00000000..0034bd3a --- /dev/null +++ b/.github/workflows/check-format.yaml @@ -0,0 +1,14 @@ +name: check format +on: + push: + pull_request: +jobs: + check-format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check formatting + run: make check-format diff --git a/.github/workflows/shelly-homekit.yaml b/.github/workflows/shelly-homekit.yaml deleted file mode 100644 index cd8fa14f..00000000 --- a/.github/workflows/shelly-homekit.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: build-shelly-homekit -on: - push: - pull_request: -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check formatting - run: make check-format - - name: Build docker image # remove if newer mos docker image is available - run: docker build -t mgos/esp32-build:4.4.1-r7 -f .github/workflows/Dockerfile-esp32-build . - - name: Install mos build tool - run: | - sudo add-apt-repository -y ppa:mongoose-os/mos - sudo apt -q install -y mos-latest - - name: Build project - run: make release RELEASE_SUFFIX=$(.github/version.py --suffix) - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - with: - name: releases - path: | - releases/* - !releases/**/elf - if-no-files-found: error From 6be5556274411564ca1d4b5e9a15ecb05dcf66ee Mon Sep 17 00:00:00 2001 From: Markus Kirberg Date: Tue, 14 May 2024 21:00:23 +0200 Subject: [PATCH 2/3] fix 1.3.0 stock upgradability --- Makefile | 2 +- mos.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d608037a..3636082c 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ ifneq "$(ALLOW_DIRTY_FS)" "1" @[ -z "$(wildcard fs/conf*.json fs/kvs.json)" ] || { echo; echo "XXX No configs in fs allowed, or set ALLOW_DIRTY_FS=1"; echo; exit 1; } endif $(MOS) build --platform=$(PLATFORM) --build-var=MODEL=$* \ - --build-dir=$(BUILD_DIR) --binary-libs-dir=./binlibs $(MOS_BUILD_FLAGS_FINAL) + --build-dir=$(BUILD_DIR) --binary-libs-dir=./binlibs $(MOS_BUILD_FLAGS_FINAL) --repo https://github.com/markirb/mongoose-os ifeq "$(RELEASE)" "1" [ $(PLATFORM) = ubuntu ] || \ (dir=releases/`jq -r .build_version $(BUILD_DIR)/gen/build_info.json`$(RELEASE_SUFFIX) && \ diff --git a/mos.yml b/mos.yml index b81aeafc..72d88b08 100644 --- a/mos.yml +++ b/mos.yml @@ -568,7 +568,7 @@ conds: MGOS_ROOT_FS_TYPE: LFS MGOS_ROOT_FS_SIZE: 458752 ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K" - ESP_IDF_EXTRA_PARTITION_2: "shelly,data,nvs,0x3fc000,16K" + ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K" ESP_IDF_SDKCONFIG_OPTS: > ${build_vars.ESP_IDF_SDKCONFIG_OPTS} CONFIG_FREERTOS_UNICORE=y @@ -604,7 +604,7 @@ conds: MGOS_ROOT_FS_TYPE: LFS MGOS_ROOT_FS_SIZE: 458752 ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K" - ESP_IDF_EXTRA_PARTITION_2: "shelly,data,nvs,0x3fc000,16K" + ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K" ESP_IDF_SDKCONFIG_OPTS: > ${build_vars.ESP_IDF_SDKCONFIG_OPTS} CONFIG_FREERTOS_UNICORE=y @@ -645,7 +645,7 @@ conds: MGOS_ROOT_FS_TYPE: LFS MGOS_ROOT_FS_SIZE: 458752 ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K" - ESP_IDF_EXTRA_PARTITION_2: "shelly,data,nvs,0x3fc000,16K" + ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K" ESP_IDF_SDKCONFIG_OPTS: > ${build_vars.ESP_IDF_SDKCONFIG_OPTS} CONFIG_FREERTOS_UNICORE=y From 812168bb96dc718c80b8da48e5c02e6da9be8c50 Mon Sep 17 00:00:00 2001 From: Markus Kirberg Date: Wed, 15 May 2024 18:19:52 +0200 Subject: [PATCH 3/3] update actions --- .github/workflows/build.yaml | 6 +++--- .github/workflows/check-format.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cc911d61..e18ce27f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,7 @@ jobs: model: [Shelly1, Shelly1L, Shelly1PM, Shelly25, Shelly2, ShellyColorBulb, ShellyDuo, ShellyI3, ShellyPlug, ShellyPlugS, ShellyPlus1, ShellyPlus1PM, ShellyPlusI4, ShellyRGBW2, ShellyVintage, ShellyUNI] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build docker image # remove if newer mos docker image is available @@ -25,8 +25,8 @@ jobs: - name: Build run: make ${{ matrix.model }} RELEASE=1 RELEASE_SUFFIX=$(.github/version.py --suffix) - name: Upload firmware artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: releases + name: releases-${{ matrix.model }} path: releases/**/shelly-homekit-${{ matrix.model }}.zip if-no-files-found: warn diff --git a/.github/workflows/check-format.yaml b/.github/workflows/check-format.yaml index 0034bd3a..17c7e568 100644 --- a/.github/workflows/check-format.yaml +++ b/.github/workflows/check-format.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check formatting