Skip to content

Commit 1f977f0

Browse files
committed
fixing mac CI issue
1 parent 716927d commit 1f977f0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/DSITest.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ jobs:
5252
python -m pip install --upgrade pip setuptools
5353
python -m pip install pytest
5454
python -m pip install .
55+
- name: Configure Matplotlib (headless) & prebuild cache
56+
run: |
57+
export MPLBACKEND=Agg
58+
export MPLCONFIGDIR="$RUNNER_TEMP/mplconfig"
59+
mkdir -p "$MPLCONFIGDIR"
60+
python - <<'PY'
61+
import matplotlib
62+
matplotlib.use("Agg")
63+
from matplotlib import font_manager
64+
font_manager._load_fontmanager(try_read_cache=False)
65+
print("Matplotlib cache:", matplotlib.get_cachedir())
66+
PY
67+
env:
68+
MPLBACKEND: Agg
69+
MPLCONFIGDIR: ${{ runner.temp }}/mplconfig
5570
- name: Test execution
5671
run: |
5772
python examples/dsi/DSITestCreateSingle.py

0 commit comments

Comments
 (0)