Skip to content

Commit

Permalink
Merge pull request #1387 from markirb/gh-ci
Browse files Browse the repository at this point in the history
Fix for stock upgradability on current Plus Models; Github Workflow to improve build speed
  • Loading branch information
markirb authored May 16, 2024
2 parents c7a0800 + 812168b commit c2694de
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 34 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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@v4
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@v4
with:
name: releases-${{ matrix.model }}
path: releases/**/shelly-homekit-${{ matrix.model }}.zip
if-no-files-found: warn
14 changes: 14 additions & 0 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
@@ -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@v4
with:
fetch-depth: 0
- name: Check formatting
run: make check-format
30 changes: 0 additions & 30 deletions .github/workflows/shelly-homekit.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) && \
Expand Down
6 changes: 3 additions & 3 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c2694de

Please sign in to comment.