From 39a1174cd8ce3e7614167b1e5acb48dd101287f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Sat, 13 Jul 2024 23:07:23 +0200 Subject: [PATCH] ci: Ignore dot subprocess error in CI --- .github/workflows/ci.yml | 2 +- scripts/gen_structure_docs.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dba87c9..92f1c808 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: run: git fetch --depth=1 --tags - name: Set up Graphviz - uses: ts-graphviz/setup-graphviz@v1 + uses: ts-graphviz/setup-graphviz@v2 - name: Set up Python uses: actions/setup-python@v5 diff --git a/scripts/gen_structure_docs.py b/scripts/gen_structure_docs.py index 5d496a38..8ca2c1f9 100644 --- a/scripts/gen_structure_docs.py +++ b/scripts/gen_structure_docs.py @@ -21,7 +21,11 @@ def _render_call_graph(module: Path) -> None: buffer = StringIO() code2flow(str(module), buffer) - svg = subprocess.check_output(["dot", "-Tsvg"], input=buffer.getvalue(), text=True) # noqa: S603, S607 + try: + svg = subprocess.check_output(["dot", "-Tsvg"], input=buffer.getvalue(), text=True) # noqa: S603, S607 + except subprocess.CalledProcessError: + # The subprocess dies with SIGSEGV in GHA... + return if 'class="node"' not in svg: print("") else: