Skip to content

Commit 1d67cec

Browse files
committed
github action installs suitesparse (thanks Claude)
1 parent f386f6f commit 1d67cec

1 file changed

Lines changed: 43 additions & 8 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ${{ matrix.os }}
1615
strategy:
1716
fail-fast: false
@@ -21,13 +20,49 @@ jobs:
2120

2221
steps:
2322
- uses: actions/checkout@v5
24-
- name: Set up Python ${{ matrix.python-version }}
23+
24+
- name: Install SuiteSparse (Ubuntu)
25+
if: runner.os == 'Linux'
26+
run: sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
27+
28+
- name: Install SuiteSparse (macOS)
29+
if: runner.os == 'macOS'
30+
run: brew install suite-sparse
31+
32+
- name: Set up Python ${{ matrix.python-version }} (non-Windows)
33+
if: runner.os != 'Windows'
2534
uses: actions/setup-python@v5
2635
with:
2736
python-version: ${{ matrix.python-version }}
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install .[test]
31-
- name: Test with pytest
32-
run: |
33-
pytest
37+
38+
- name: Set up conda with Python and SuiteSparse (Windows)
39+
if: runner.os == 'Windows'
40+
uses: conda-incubator/setup-miniconda@v3
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
auto-activate-base: false
44+
activate-environment: test-env
45+
channels: conda-forge
46+
47+
- name: Install SuiteSparse via conda (Windows)
48+
if: runner.os == 'Windows'
49+
shell: bash -el {0}
50+
run: conda install -c conda-forge suitesparse --yes
51+
52+
- name: Install dependencies (non-Windows)
53+
if: runner.os != 'Windows'
54+
run: python -m pip install .[test]
55+
56+
- name: Install dependencies (Windows)
57+
if: runner.os == 'Windows'
58+
shell: bash -el {0}
59+
run: python -m pip install .[test]
60+
61+
- name: Test with pytest (non-Windows)
62+
if: runner.os != 'Windows'
63+
run: pytest
64+
65+
- name: Test with pytest (Windows)
66+
if: runner.os == 'Windows'
67+
shell: bash -el {0}
68+
run: pytest

0 commit comments

Comments
 (0)