Skip to content

Commit

Permalink
Add windows build/tests to test-sundials CI
Browse files Browse the repository at this point in the history
  • Loading branch information
c-randall committed Dec 23, 2024
1 parent 27f9a83 commit ed3706c
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/test-sundials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,61 @@ jobs:
tox
env:
TOXENV: ${{ matrix.tox-env }}

test-windows:
name: (Test ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest] # set more OS here, if desired
python-version: ["3.9", "3.13"] # set more python versions here, if desired

defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup conda/python
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniconda-version: latest
activate-environment: odes
python-version: ${{ matrix.python-version }}

- name: Setup SUNDIALS
run: conda install sundials=7.1.1 -c conda-forge # SUNDIALS version is set here

- name: Verify environment
run: |
conda info
conda list
- name: Set SUNDIALS installation path
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "SUNDIALS_INST=%CONDA_PREFIX%/Library" >> $GITHUB_ENV
else
echo "SUNDIALS_INST=$CONDA_PREFIX" >> $GITHUB_ENV
fi
- name: Install scikits-odes-sundials
working-directory: packages/scikits-odes-sundials
run: |
python -m pip install --upgrade pip
pip install .
- name: List info
run: |
conda info
conda list
- name: Run tests
working-directory: packages/scikits-odes-sundials/src/scikits_odes_sundials
run: |
pip install pytest
pytest .

0 comments on commit ed3706c

Please sign in to comment.