Skip to content

Commit f63bbca

Browse files
committed
Live play: each bevy-ts case's run is bounded (RAEA_CASE_SECONDS, default 180, by coreutils' timeout where there is one), so a run that hangs is that case open, with its reason, rather than the whole check stuck; rc3's Windows Live play ran 24 minutes with no output until the run was cancelled. release.yml's step streams each case's line as it finishes, bounds each case at 300s (a fresh Windows runner's first play opens in about 100s, the next in seconds) and the step at 75 minutes
1 parent 668ae2e commit f63bbca

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,18 @@ jobs:
196196
if ($im) { Add-Content $env:GITHUB_PATH $im.FullName }
197197
# without the loader's debug lines (lavapipe.sh sets them for the driver's registration), and a failing case's
198198
# log tail in the job's log, since the runner and its logs go when the job ends
199+
# each case is bounded by check.sh (RAEA_CASE_SECONDS: a fresh runner's first play opens in about 100s, the next in
200+
# seconds); the step's own bound is for the rest
199201
- name: Live play (bevy-ts's play cases)
202+
timeout-minutes: 75
200203
env:
201204
VK_LOADER_DEBUG: ""
205+
RAEA_CASE_SECONDS: "300"
202206
run: |
203207
b="$PWD/target/dist/raea.exe"
204208
out="${TMPDIR:-/tmp}/raea-bevy-ts"
205-
s=0; RAEA_BIN="$b" RAEA_PLUGIN_BIN="$b" bash sdk/raea/bench/bevy-ts/check.sh $(grep -l '^// play:' sdk/raea/bench/bevy-ts/cases/*.tsx) > "$RUNNER_TEMP/play.txt" 2>&1 || s=$?
206-
tee -a "$GITHUB_STEP_SUMMARY" < "$RUNNER_TEMP/play.txt"
209+
s=0; RAEA_BIN="$b" RAEA_PLUGIN_BIN="$b" bash sdk/raea/bench/bevy-ts/check.sh $(grep -l '^// play:' sdk/raea/bench/bevy-ts/cases/*.tsx) 2>&1 | tee "$RUNNER_TEMP/play.txt" || s=$?
210+
cat "$RUNNER_TEMP/play.txt" >> "$GITHUB_STEP_SUMMARY"
207211
for n in $(sed -n 's/^\([^ ]*\) (.*): OPEN.*/\1/p' "$RUNNER_TEMP/play.txt"); do echo "--- $n"; grep -v "known driver" "$out/$n.log" | tail -25; done
208212
exit $s
209213
- uses: actions/attest-build-provenance@v2

‎sdk/raea/bench/bevy-ts/check.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ BIN=${RAEA_BIN:-raea}
2525
PLUGIN_BIN=${RAEA_PLUGIN_BIN:-$ROOT/sdk/raea/bench/bevy-plugins/motion.sh}
2626
OUT=${TMPDIR:-/tmp}/raea-bevy-ts
2727
mkdir -p "$OUT"
28+
# each case's run bounded (RAEA_CASE_SECONDS, default 180), so a run that hangs is that case open rather than the whole
29+
# check stuck (a Windows release job's Live play hung until it was cancelled); coreutils' timeout, gtimeout on a Mac
30+
# with Homebrew's, else unbounded
31+
bound=()
32+
for t in timeout gtimeout; do command -v $t > /dev/null && { bound=($t -k 10 "${RAEA_CASE_SECONDS:-180}"); break; }; done
2833
cases=()
2934
if [ $# -eq 0 ]; then
3035
for f in "$HERE"/cases/*.tsx; do cases+=("$f"); done
@@ -56,9 +61,11 @@ for edit in "${cases[@]}"; do
5661
else
5762
run=("$bin" render "$edit" --frame "${frame:-0}" ${extra[@]+"${extra[@]}"} -o "$png")
5863
fi
59-
if ! RAEA_SCENE_ROWS=1 nice -n 10 "${run[@]}" > "$log" 2>&1 || [ ! -f "$png" ]; then
64+
s=0; RAEA_SCENE_ROWS=1 nice -n 10 ${bound[@]+"${bound[@]}"} "${run[@]}" > "$log" 2>&1 || s=$?
65+
if [ $s -ne 0 ] || [ ! -f "$png" ]; then
6066
# (not the Vulkan loader's own INFO lines, which VK_LOADER_DEBUG prints on a CI runner: "... is not recognized ...")
6167
why=$(grep -iE "error|refused|not |no " "$log" | grep -v "global logger" | grep -v "INFO |" | tail -1 | cut -c1-160)
68+
[ $s -eq 124 ] || [ $s -eq 137 ] && why="it ran past ${RAEA_CASE_SECONDS:-180}s and was stopped"
6269
echo "$name ($gap): OPEN the render failed: ${why:-see $log}"; open=$((open + 1)); continue
6370
fi
6471
bad=""

0 commit comments

Comments
 (0)