I hate CI

This commit is contained in:
suchmememanyskill
2024-02-07 23:07:44 +01:00
parent 82b1d515d1
commit e669017949

4
ci.py
View File

@@ -2,8 +2,6 @@ import subprocess, os, shutil
CYD_PORTS = ["esp32-3248S035C", "esp32-2432S028R"] CYD_PORTS = ["esp32-3248S035C", "esp32-2432S028R"]
BASE_DIR = os.getcwd() BASE_DIR = os.getcwd()
PYTHON3 = "py" if os.name == "nt" else "python3"
if os.path.exists("out"): if os.path.exists("out"):
shutil.rmtree("out") shutil.rmtree("out")
@@ -20,4 +18,4 @@ for port in CYD_PORTS:
shutil.copy(os.path.join(os.path.expanduser("~"), ".platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin"), f"{port_path}/boot_app0.bin") shutil.copy(os.path.join(os.path.expanduser("~"), ".platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin"), f"{port_path}/boot_app0.bin")
os.chdir(port_path) os.chdir(port_path)
subprocess.run([PYTHON3, "-m", "esptool", "--chip", "esp32", "merge_bin", "-o", "merged_firmware.bin", "--flash_mode", "dio", "--flash_freq", "40m", "--flash_size", "4MB", "0x1000", "bootloader.bin", "0x8000", "partitions.bin", "0xe000", "boot_app0.bin", "0x10000", "firmware.bin"], check=True) subprocess.run(["python3", "-m", "esptool", "--chip", "esp32", "merge_bin", "-o", "merged_firmware.bin", "--flash_mode", "dio", "--flash_freq", "40m", "--flash_size", "4MB", "0x1000", "bootloader.bin", "0x8000", "partitions.bin", "0xe000", "boot_app0.bin", "0x10000", "firmware.bin"], check=True)