A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 4, 02:30 UTC
Use `pre-commit / pre-run-check` to gate docs build too (#42053)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
May 9, 2026 at 01:02 UTC
30f519e947d4dbea0bceef002f2f567faa8c8457
1 file changed
+38
.readthedocs.yaml
+38
@@ -9,6 +9,44 @@ build:
9
python: "3.12"
10
jobs:
11
post_checkout:
12
+ - |
13
+ if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
14
+ MAX_WAIT=300
15
+ INTERVAL=60
16
+ ELAPSED=0
17
+ while :; do
18
+ RAW=$(curl -sS -w "\n%{http_code}" "https://api.github.com/repos/vllm-project/vllm/commits/${READTHEDOCS_GIT_COMMIT_HASH}/check-runs?check_name=pre-run-check&filter=latest")
19
+ HTTP_CODE=$(printf %s "$RAW" | tail -n1)
20
+ BODY=$(printf %s "$RAW" | head -n -1)
21
+ if [ "$HTTP_CODE" != "200" ]; then
22
+ echo "GitHub API returned HTTP $HTTP_CODE (likely rate-limited); skipping pre-run-check gate."
23
+ break
24
+ fi
25
+ STATUS=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"status\") or \"\") if r else \"none\")")
26
+ CONCLUSION=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"conclusion\") or \"\") if r else \"\")")
27
+ if [ "$STATUS" = "none" ]; then
28
+ echo "no pre-run-check found for this commit; skipping gate."
29
+ break
30
+ fi
31
+ if [ -n "$CONCLUSION" ]; then
32
+ echo "pre-run-check conclusion: $CONCLUSION"
33
+ if [ "$CONCLUSION" = "failure" ] || [ "$CONCLUSION" = "cancelled" ] || [ "$CONCLUSION" = "timed_out" ]; then
34
+ echo "pre-run-check did not pass; failing docs build."
35
+ exit 1
36
+ fi
37
+ break
38
+ fi
39
+ if [ "$ELAPSED" -ge "$MAX_WAIT" ]; then
40
+ echo "pre-run-check status=$STATUS after ${MAX_WAIT}s; skipping gate."
41
+ break
42
+ fi
43
+ echo "pre-run-check status=$STATUS; waiting ${INTERVAL}s..."
44
+ sleep "$INTERVAL"
45
+ ELAPSED=$((ELAPSED + INTERVAL))
46
+ done
47
+ else
48
+ echo "Not a PR build (version type=$READTHEDOCS_VERSION_TYPE); skipping pre-run-check gate."
49
+ fi
50
- git fetch origin main --unshallow --no-tags --filter=blob:none || true
51
pre_create_environment:
52
- pip install uv