From ac31ab70216716bcaebb4168074b9a790f4fda8a Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Fri, 10 Jul 2026 19:57:21 +0300 Subject: docs-infra: retry LaTeX only when PDF absent; constrained poppler install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated by [robots](https://vyos.io) --- .github/workflows/docs-build.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 3cc4298c..bdb9e41d 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -73,9 +73,11 @@ jobs: # command's exit code. A bare existence/size check would let a # truncated-but-large PDF (LaTeX aborting partway through) pass, so # the completeness signal is pdfinfo's page count instead of file - # size. The retry-once below (§14 LaTeX flakiness) still applies - # first; the trailing `|| true` only swallows latexmk -f's expected - # non-zero exit on a genuinely complete document. + # size. The §14 retry-once is gated on artifact ABSENCE: latexmk -f + # exits non-zero even on a fully-produced PDF, so an unconditional + # `|| make latexpdf` would double the ~10-min LaTeX step on every + # forced success. Each `|| true` only swallows that expected + # non-zero exit; the validation below is the real success signal. LATEXMKOPTS: -f LATEXOPTS: -interaction=nonstopmode run: | @@ -89,8 +91,11 @@ jobs: set -e cd docs && make html if [ "${{ inputs.skip_pdf }}" != "true" ]; then - make latexpdf || make latexpdf || true pdf=_build/latex/VyOS.pdf + make latexpdf || true + # retry ONLY when no artifact was produced (§14 LaTeX flakiness) — + # latexmk -f exits non-zero even on success, so exit code cannot gate this + [ -f "$pdf" ] || make latexpdf || true [ -f "$pdf" ] || { echo "$pdf not produced — build genuinely failed"; exit 1; } # Page-count floor as a completeness signal (a truncated forced-mode # run can still leave behind a file that exists and is large). rolling -- cgit v1.2.3