Skip to content

Commit

Permalink
Merge pull request #197 from c-randall/win-ci-tests
Browse files Browse the repository at this point in the history
Add Windows/MacOS to test-sundials CI
  • Loading branch information
aragilar authored Jan 12, 2025
2 parents 27f9a83 + 755b666 commit ea608d8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/test-sundials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,71 @@ jobs:
tox
env:
TOXENV: ${{ matrix.tox-env }}

tests-win-mac:
name: tests (${{ matrix.python-version }}, ${{matrix.sundials-version}}, ${{ matrix.os }}, double, 32)
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, macos-13]
python-version: ["3.9", "3.13"]
sundials-version: ["7.1.1"]
include:
- python-version: "3.9"
tox-env: py39
- python-version: "3.13"
tox-env: py313

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

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

- name: Setup Python and SUNDIALS
uses: mamba-org/setup-micromamba@v2
with:
environment-name: odes
create-args: >-
python=${{ matrix.python-version }}
sundials=${{ matrix.sundials-version }}
condarc: |
channels:
- conda-forge
- name: Verify environment
run: |
micromamba info
micromamba list
- name: Set SUNDIALS path
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
SUNDIALS_INST="$CONDA_PREFIX\Library"
else
SUNDIALS_INST="$CONDA_PREFIX"
fi
echo "SUNDIALS_INST is set to: $SUNDIALS_INST"
echo "SUNDIALS_INST=$SUNDIALS_INST" >> $GITHUB_ENV
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade tox
- name: List info
run: |
micromamba info
micromamba list
- name: Run tests
working-directory: packages/scikits-odes-sundials
run: tox
env:
TOXENV: ${{ matrix.tox-env }}
1 change: 1 addition & 0 deletions packages/scikits-odes-sundials/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ setenv = LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8

[testenv]
passenv=
SUNDIALS_INST
SUNDIALS_DIR
SUNDIALS_LIBDIR
SUNDIALS_INCLUDEDIR
Expand Down

0 comments on commit ea608d8

Please sign in to comment.