71 """Build single binaries for release across all targets"""
72 version = os.environ.get(
"GITHUB_REF_NAME",
"dev")
75 if os.path.exists(dist_dir):
76 shutil.rmtree(dist_dir)
79 for board, defaults_file
in TARGET_BOARDS.items():
80 print(
"\n=========================================")
81 if not os.path.exists(defaults_file):
82 print(f
"ā ļø Warning: {defaults_file} not found. Skipping {board}...")
85 print(f
"š Building Target: {board} ({defaults_file})")
86 print(
"=========================================")
88 c.run(
"idf.py fullclean", pty=
True)
89 if os.path.exists(
"sdkconfig"):
90 os.remove(
"sdkconfig")
92 build_cmd = f
"idf.py -D SDKCONFIG_DEFAULTS={defaults_file} -D CMAKE_BUILD_TYPE=Release build"
93 c.run(build_cmd, pty=
True)
95 c.run(
"idf.py merge-bin", pty=
True)
97 source_bin =
"build/merged-binary.bin"
98 target_bin = os.path.join(dist_dir, f
"ChaosDMX-{board}-{version}.bin")
100 if os.path.exists(source_bin):
101 shutil.copy(source_bin, target_bin)
102 print(f
"ā Asset successfully created: {target_bin}")
104 print(f
"ā Error: {source_bin} was not created.")