From 708ad3acf934b56d5970a150d640b1b3d9369d93 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 12 Jun 2026 20:26:27 +0800 Subject: [PATCH] CI: Allow Doctests workflow to pass for segment fault on Windows (#4664) --- .github/workflows/ci_doctests.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_doctests.yaml b/.github/workflows/ci_doctests.yaml index 9ac8ae62725..c4a8d6cdbed 100644 --- a/.github/workflows/ci_doctests.yaml +++ b/.github/workflows/ci_doctests.yaml @@ -84,4 +84,12 @@ jobs: # Run the doctests - name: Run doctests - run: make doctest PYTEST_EXTRA="-r P" + run: | + log_file="${RUNNER_TEMP}/pytest.log" + make doctest PYTEST_EXTRA="-r P" 2>&1 | tee "${log_file}" + exit_code=${PIPESTATUS[0]} + if [[ "${RUNNER_OS}" == "Windows" && "${exit_code}" -eq 2 ]] && grep -q "make: .* Error 2816" "${log_file}"; then + echo "Doctests exited with make error 2816 (segmentation fault) on Windows; allowing workflow to continue." + exit 0 + fi + exit "${exit_code}"