Skip to content

Commit 0a4f634

Browse files
authored
Merge pull request #49 from renbytes/dev-ciFix
CI - Fix pygraphviz compilation error in GitHub CI
2 parents b99a042 + 5b0a792 commit 0a4f634

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ jobs:
3434
with:
3535
python-version: "3.11.9"
3636

37-
# This step will only run for the "Run Tests & Check Coverage" job
38-
- name: "Install Graphviz"
39-
if: matrix.task.needs_graphviz == true
37+
# Install system dependencies FIRST, before Poetry installation
38+
- name: "Install system dependencies"
4039
run: |
4140
sudo apt-get update
42-
sudo apt-get install -y graphviz graphviz-dev libgraphviz-dev pkg-config
41+
sudo apt-get install -y --no-install-recommends \
42+
build-essential \
43+
graphviz \
44+
graphviz-dev \
45+
libgraphviz-dev \
46+
pkg-config
4347
4448
- name: "Install Poetry"
4549
run: |
@@ -56,9 +60,9 @@ jobs:
5660
with:
5761
path: .venv
5862
# Include pyproject.toml in cache key to invalidate when dependencies change
59-
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}-v2
63+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}-v3
6064
restore-keys: |
61-
poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}-v2
65+
poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }}-v3
6266
poetry-${{ runner.os }}-
6367
6468
- name: "Clean corrupted packages and install dependencies"
@@ -78,7 +82,7 @@ jobs:
7882
- name: "Verify installation"
7983
run: |
8084
poetry run python -c "import sys; print('Python version:', sys.version)"
81-
poetry run python -c "import pygraphviz; print('pygraphviz version:', pygraphviz.__version__)" || echo "pygraphviz not needed for this job"
85+
poetry run python -c "import pygraphviz; print('pygraphviz version:', pygraphviz.__version__)"
8286
8387
- name: "Run Task"
8488
run: ${{ matrix.task.run_command }}

0 commit comments

Comments
 (0)