Skip to content

Commit 2149894

Browse files
authored
CI: Allow Doctests workflow to pass for segment fault on Windows (#4676)
1 parent ff455b6 commit 2149894

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci_doctests.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,12 @@ jobs:
8484

8585
# Run the doctests
8686
- name: Run doctests
87-
run: make doctest PYTEST_EXTRA="-r P"
87+
run: |
88+
log_file="${RUNNER_TEMP}/pytest.log"
89+
make doctest PYTEST_EXTRA="-r P" 2>&1 | tee "${log_file}"
90+
exit_code=${PIPESTATUS[0]}
91+
if [[ "${RUNNER_OS}" == "Windows" && "${exit_code}" -eq 2 ]] && grep -q "make: .* Error 2816" "${log_file}"; then
92+
echo "Doctests exited with make error 2816 (segmentation fault) on Windows; allowing workflow to continue."
93+
exit 0
94+
fi
95+
exit "${exit_code}"

0 commit comments

Comments
 (0)