-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
CI: Discover and build with usermod envs - 0.16 #5835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16_x
Are you sure you want to change the base?
Changes from all commits
0e5b4c4
a6fbf38
e10fa37
502a1e5
3ff8afc
37e7de3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -776,7 +776,7 @@ platform = ${esp32_idf_V4.platform} | |
| platform_packages = ${esp32_idf_V4.platform_packages} | ||
| build_unflags = ${common.build_unflags} | ||
| build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\" | ||
| -DTOUCH_CS=9 -DWLED_USE_SD_SPI ;; help a few usermods that require special flags to compile | ||
| -DTOUCH_CS=9 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 4 'WLED_USE_SD_(SPI|MMC)|\[env:usermods\]|custom_usermods' \
platformio.ini usermods .github || trueRepository: wled/WLED Length of output: 50367 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- changed hunk ---'
git diff --unified=8 -- platformio.ini | sed -n '/\[env:usermods\]/,/^@@/p'
printf '%s\n' '--- effective usermods environment ---'
sed -n '768,788p' platformio.ini
sed -n '1,45p' usermods/platformio_override.usermods.ini
printf '%s\n' '--- SD-card build and initialization paths ---'
sed -n '1,125p' usermods/sd_card/sd_card.cpp
printf '%s\n' '--- SD-card metadata ---'
find usermods/sd_card -maxdepth 1 -type f -printRepository: wled/WLED Length of output: 5662 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- platformio.ini SD defines and build-flag inheritance ---'
rg -n -C 2 'WLED_USE_SD_(SPI|MMC)|^\[common\]|^\[esp32|^\[env:usermods\]|^build_flags' platformio.ini
printf '%s\n' '--- SD-card usermod registration ---'
cat usermods/sd_card/library.json
printf '%s\n' '--- exact platformio.ini diff ---'
git diff --unified=3 -- platformio.ini | rg -n -C 6 'TOUCH_CS|WLED_USE_SD|env:usermods|^[-+]' || trueRepository: wled/WLED Length of output: 15479 Restore the SD-card storage-mode define.
🤖 Prompt for AI Agents📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🤖 get_repo_knowledge executed:
Length of output: 45629 🏁 Script executed: #!/bin/bash
git diff -- platformio.ini | sed -n '1,180p'
printf '\n--- effective relevant sections ---\n'
sed -n '760,795p' platformio.iniRepository: wled/WLED Length of output: 1374 Confirm explicit approval before merging. This change modifies 🤖 Prompt for AI AgentsSource: Coding guidelines
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a workaround to support the SD card usermod. We plan to adjust #5679 so this is not needed any more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- PR metadata ---'
gh pr view 5679 --repo wled/WLED --json number,state,mergedAt,baseRefName,headRefName,title,url --jq '.'
printf '%s\n' '--- changed files related to SD-card configuration ---'
gh pr view 5679 --repo wled/WLED --json files \
--jq '.files[] | select(.path | test("(^usermods/sd_card/|platformio.*\\.ini$)")) | .path'
printf '%s\n' '--- PR diff lines related to storage selection ---'
gh pr diff 5679 --repo wled/WLED -- \
| rg -n -C 4 'WLED_USE_SD_(SPI|MMC)|SD_ADAPTER|sd_card|SD\.begin|SD_MMC\.begin' || trueLength of output: 6260
Please include the dependent workflow change here, or merge/rebase the completed 🐇 ✏️ Learnings added
🧠 Learnings usedYou are interacting with an AI system. |
||
| lib_deps = ${esp32_idf_V4.lib_deps} | ||
| monitor_filters = esp32_exception_decoder | ||
| board_build.flash_mode = dio | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # CI sample override file: this usermod has dependencies. | ||
| # Based on the CI standard but adds the Temperature usermod too. | ||
|
|
||
| [platformio] | ||
| default_envs = usermods_esp32, usermods_esp32c3, usermods_esp32s2, usermods_esp32s3 | ||
|
|
||
| [env:usermods_esp32] | ||
| extends = env:esp32dev | ||
| custom_usermods = ${usermods.custom_usermods} | ||
| board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat | ||
| build_flags = ${env:esp32dev.build_flags} -D WLED_DEBUG | ||
|
|
||
|
|
||
| [env:usermods_esp32c3] | ||
| extends = env:esp32c3dev | ||
| board = esp32-c3-devkitm-1 | ||
| custom_usermods = ${usermods.custom_usermods} | ||
| board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat | ||
| build_flags = ${env:esp32c3dev.build_flags} -D WLED_DEBUG | ||
|
|
||
|
|
||
| [env:usermods_esp32s2] | ||
| extends = env:lolin_s2_mini | ||
| custom_usermods = ${usermods.custom_usermods} | ||
| board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat | ||
| build_flags = ${env:lolin_s2_mini.build_flags} -D WLED_DEBUG | ||
|
|
||
|
|
||
| [env:usermods_esp32s3] | ||
| extends = env:esp32s3dev_16MB_opi | ||
| custom_usermods = ${usermods.custom_usermods} | ||
| board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat | ||
| build_flags = ${env:esp32s3dev_16MB_opi.build_flags} -D WLED_DEBUG | ||
|
|
||
|
|
||
| [usermods] | ||
| custom_usermods = PWM_fan | ||
| Temperature |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,16 @@ | ||||||
| ; Options | ||||||
| ; ------- | ||||||
| ; USERMOD_SN_PHOTORESISTOR - define this to have this user mod included wled00\usermods_list.cpp | ||||||
| ; USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds | ||||||
| ; USERMOD_SN_PHOTORESISTOR_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 20 seconds | ||||||
| ; USERMOD_SN_PHOTORESISTOR_REFERENCE_VOLTAGE - the voltage supplied to the sensor, defaults to 5v | ||||||
| ; USERMOD_SN_PHOTORESISTOR_ADC_PRECISION - the ADC precision is the number of distinguishable ADC inputs, defaults to 1024.0 (10 bits) | ||||||
| ; USERMOD_SN_PHOTORESISTOR_RESISTOR_VALUE - the resistor size, defaults to 10000.0 (10K hms) | ||||||
| ; USERMOD_SN_PHOTORESISTOR_OFFSET_VALUE - the offset value to report on, defaults to 25 | ||||||
| ; | ||||||
| [env:usermod_sn_photoresistor_d1_mini] | ||||||
| extends = env:d1_mini | ||||||
| [env:usermod_sn_photoresistor_esp8266_2m] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Update the documented environment name.
🤖 Prompt for AI Agents |
||||||
| extends = env:esp8266_2m | ||||||
| custom_usermods = ${env:esp8266_2m.custom_usermods} SN_Photoresistor | ||||||
| build_flags = | ||||||
| ${common.build_flags_esp8266} | ||||||
| -D USERMOD_SN_PHOTORESISTOR | ||||||
| lib_deps = ${env.lib_deps} | ||||||
| ${env:esp8266_2m.build_flags} | ||||||
| -D USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL=60 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use milliseconds for the measurement interval. The sample documents this option as milliseconds and describes 60 seconds as the intended interval. The value Proposed fix- -D USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL=60
+ -D USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL=60000📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| lib_deps = ${env:esp8266_2m.lib_deps} | ||||||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Enable validation for all pull requests and pushes.
The workflow triggers on
pull_requestandpushchanges underusermods/**, butget_usermod_envsruns only for fork pull requests. Same-repository pull requests and pushes skip it, andbuildskips for the same reason. For pushes, use a push-specific matrix discovery path becausegithub.event.pull_request.base.shais unavailable.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 1-116: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 16-58: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents