Skip to content

Commit d9bcf3c

Browse files
committed
Debug: add 4e/4f checkpoints; create-release auto-triggers cache build
1 parent e29ef59 commit d9bcf3c

2 files changed

Lines changed: 36 additions & 3 deletions

File tree

scripts/create-release.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,38 @@ def bump_version_files(tag):
7979
out.writelines(new_lines)
8080
print(f"Updated {path}: {pretty_key}={tag}, version bumped by 1")
8181

82+
def trigger_and_wait_cache_build():
83+
"""Trigger a new build-cache CI run and wait for it to complete."""
84+
import time
85+
print("Triggering build-cache CI run...")
86+
r = subprocess.run(
87+
["gh", "workflow", "run", "build-cache.yml", "--repo", repo],
88+
capture_output=True, text=True
89+
)
90+
if r.returncode != 0:
91+
print(f" WARNING: Could not trigger build-cache: {r.stderr.strip()}")
92+
return None
93+
time.sleep(5) # wait for run to register
94+
r2 = subprocess.run(
95+
["gh", "run", "list", "--repo", repo, "--workflow", "build-cache.yml",
96+
"--limit", "1", "--json", "databaseId,status"],
97+
capture_output=True, text=True
98+
)
99+
if r2.returncode != 0: return None
100+
run_id = json.loads(r2.stdout)[0]["databaseId"]
101+
print(f" Waiting for run {run_id} to complete...")
102+
while True:
103+
r3 = subprocess.run(
104+
["gh", "run", "view", str(run_id), "--repo", repo, "--json", "status,conclusion"],
105+
capture_output=True, text=True
106+
)
107+
data = json.loads(r3.stdout)
108+
if data["status"] == "completed":
109+
print(f" Run {run_id} completed with: {data['conclusion']}")
110+
return run_id if data["conclusion"] == "success" else None
111+
print(f" Status: {data['status']}... waiting 15s")
112+
time.sleep(15)
113+
82114
def download_cache_artifacts():
83115
"""Download precompiled .o files from latest successful build-cache CI run."""
84116
import subprocess, json

src/Processing.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,10 +3463,8 @@ void PApplet::run(){
34633463
#endif
34643464
glfwSwapBuffers(gWindow);
34653465
#ifdef _WIN32
3466-
MessageBoxA(NULL, "Before second glClear", "Debug4d", MB_OK);
3466+
MessageBoxA(NULL, "After glfwSwapBuffers", "Debug4e", MB_OK);
34673467
#endif
3468-
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
3469-
34703468
// preventing missed inputs on Windows where events can arrive between polls.
34713469
glfwSetInputMode(gWindow, GLFW_STICKY_KEYS, GLFW_TRUE);
34723470
glfwSetInputMode(gWindow, GLFW_STICKY_MOUSE_BUTTONS, GLFW_TRUE);
@@ -3479,6 +3477,9 @@ void PApplet::run(){
34793477
glfwSetWindowSizeCallback(gWindow, winsize_cb);
34803478
glfwSetWindowFocusCallback(gWindow, focus_cb);
34813479
glfwSetWindowPosCallback(gWindow, winpos_cb);
3480+
#ifdef _WIN32
3481+
MessageBoxA(NULL, "After callbacks", "Debug4f", MB_OK);
3482+
#endif
34823483
focused=(glfwGetWindowAttrib(gWindow,GLFW_FOCUSED)==GLFW_TRUE);
34833484

34843485
// Auto-load default.ttf from project root as the default font

0 commit comments

Comments
 (0)