platformio: add json validation step to fs builder
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Torrie Fischer 2023-02-18 17:47:25 +01:00
parent 2cbfcecab9
commit ea876e243d
3 changed files with 24 additions and 9 deletions

View File

@ -12,6 +12,6 @@
"Idle": ["Solid", "MPU5060", "Pulse", "IdleColors", "CircadianRhythm"], "Idle": ["Solid", "MPU5060", "Pulse", "IdleColors", "CircadianRhythm"],
"Acid": ["Chimes", "Pulse", "MPU5060", "IdleColors", "Rainbow"], "Acid": ["Chimes", "Pulse", "MPU5060", "IdleColors", "Rainbow"],
"Flashlight": ["Flashlight"] "Flashlight": ["Flashlight"]
} },
"surfaceMap": "default" "surfaceMap": "default"
} }

View File

@ -11,6 +11,7 @@
[common_env_data] [common_env_data]
src_filter = "+<*> -<.git/> -<.svn/> -<platform/> -<inputs/>" src_filter = "+<*> -<.git/> -<.svn/> -<platform/> -<inputs/>"
lib_ldf_mode = chain+ lib_ldf_mode = chain+
extra_scripts = verify-configs.py
src_build_flags = src_build_flags =
-DRENDERBUG_VERSION=3 -DRENDERBUG_VERSION=3
-DRENDERBUG_LED_PIN=14 -DRENDERBUG_LED_PIN=14
@ -91,6 +92,7 @@ src_build_flags =
[env:esp32] [env:esp32]
extends = config_nocolor extends = config_nocolor
extra_scripts = verify-configs.py
platform = espressif32 platform = espressif32
board = featheresp32 board = featheresp32
framework = arduino framework = arduino
@ -170,15 +172,15 @@ lib_deps =
ESP8266WiFi ESP8266WiFi
${config_ota.lib_deps} ${config_ota.lib_deps}
[env:home_lighting_grb] #[env:home_lighting_grb]
extends = env:home_lighting #extends = env:esp8266_wifi config_u8display
src_build_flags = #src_build_flags =
${env:home_lighting.src_build_flags} # ${env:home_lighting.src_build_flags}
-DRENDERBUG_LED_PACKING=GRB # -DRENDERBUG_LED_PACKING=GRB
[env:home_lighting-12f] #[env:home_lighting-12f]
extends = env:home_lighting #extends = env:esp8266_wifi config_u8display
board = esp12e #board = esp12e
;[env:photon] ;[env:photon]
;platform = particlephoton ;platform = particlephoton

13
verify-configs.py Normal file
View File

@ -0,0 +1,13 @@
Import("env")
import fnmatch
import os
def verify_json(source, target, env):
for root, dirnames, files in os.walk("data"):
for file in files:
if file.endswith(".json"):
if (env.Execute("json_verify < " + root + '/' + file)):
Exit(1)
env.AddPreAction("buildfs", verify_json)