Skip to content

Commit a2a2596

Browse files
committed
fix: resolve 8 CI build failures in custom usermod environments
- BME280_v2: fix default_envs typo (usermod_bme280_esp8266_2m → usermod_esp8266_2m to match actual [env:] section name) - DHT: replace extends env:custom32_LEDPIN_16 (not in this fork) with env:esp32dev + -D LEDPIN=16; rename env accordingly - SN_Photoresistor: replace ${common.build_flags_esp8266} (key absent in this fork) with ${env:esp8266_2m.build_flags} / lib_deps equivalent - sht: guard ESP.getChipModel() behind #ifdef ARDUINO_ARCH_ESP32 — method does not exist on ESP8266 (fixes custom_esp8266_2m_usermod_sht build) - EleksTube_IPS: delete platformio_override.ini.sample — library.json is disabled so the env cannot build; delete rather than ship a broken sample - pixels_dice_tray: exclude from build_custom matrix (same as standard matrix) — BLE library incompatibility with current IDF causes build failure - workflow: add PWM_fan / BME68X_v2 to exclusion list in get_custom_build_envs for consistency with get_usermod_envs
1 parent 76b1e0a commit a2a2596

6 files changed

Lines changed: 15 additions & 39 deletions

File tree

.github/workflows/usermods.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
result='[]'
123123
for sample in $samples; do
124124
usermod=$(dirname "$sample" | xargs basename)
125+
# Skip usermods known to be incompatible (same list as get_usermod_envs)
126+
case "$usermod" in PWM_fan|BME68X_v2|pixels_dice_tray) continue ;; esac
125127
envs=$(grep -E '^\[env:[^]]+\]' "$sample" | sed 's/^\[env:\(.*\)\]$/\1/')
126128
for env in $envs; do
127129
result=$(echo "$result" | jq --arg u "$usermod" --arg e "$env" '. + [{usermod: $u, env: $e}]')

usermods/BME280_v2/platformio_override.ini.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copy to platformio_override.ini in the WLED root to use.
33

44
[platformio]
5-
default_envs = usermod_bme280_esp8266_2m
5+
default_envs = usermod_esp8266_2m
66

77
[env:usermod_esp8266_2m]
88
extends = env:esp8266_2m

usermods/DHT/platformio_override.ini.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ extends = env:esp8266_2m
1313
custom_usermods = ${env:esp8266_2m.custom_usermods} DHT
1414
build_flags = ${env:esp8266_2m.build_flags} -D USERMOD_DHT_CELSIUS
1515

16-
[env:custom32_LEDPIN_16_usermod_dht_C]
17-
extends = env:custom32_LEDPIN_16
18-
custom_usermods = ${env:custom32_LEDPIN_16.custom_usermods} DHT
19-
build_flags = ${env:custom32_LEDPIN_16.build_flags} -D USERMOD_DHT_CELSIUS -D USERMOD_DHT_STATS
16+
[env:esp32dev_LEDPIN_16_usermod_dht_C]
17+
extends = env:esp32dev
18+
custom_usermods = ${env:esp32dev.custom_usermods} DHT
19+
build_flags = ${env:esp32dev.build_flags} -D LEDPIN=16 -D USERMOD_DHT_CELSIUS -D USERMOD_DHT_STATS
2020

usermods/EleksTube_IPS/platformio_override.ini.sample

Lines changed: 0 additions & 32 deletions
This file was deleted.

usermods/SN_Photoresistor/platformio_override.ini.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
extends = env:esp8266_2m
1212
custom_usermods = ${env:esp8266_2m.custom_usermods} SN_Photoresistor
1313
build_flags =
14-
${common.build_flags_esp8266}
14+
${env:esp8266_2m.build_flags}
1515
-D USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL=60
16-
lib_deps = ${env.lib_deps}
16+
lib_deps = ${env:esp8266_2m.lib_deps}

usermods/sht/sht.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ void ShtUsermod::appendDeviceToMqttDiscoveryMessage(JsonDocument& root) {
143143
device[F("ids")] = escapedMac.c_str();
144144
device[F("name")] = serverDescription;
145145
device[F("sw")] = versionString;
146+
// AI: below section was generated by an AI
147+
#ifdef ARDUINO_ARCH_ESP32
146148
device[F("mdl")] = ESP.getChipModel();
149+
#else
150+
device[F("mdl")] = F("ESP8266");
151+
#endif
152+
// AI: end
147153
device[F("mf")] = F("espressif");
148154
}
149155

0 commit comments

Comments
 (0)