Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows/MacOS to test-sundials CI #197

Merged
merged 13 commits into from
Jan 12, 2025
Merged

Conversation

c-randall
Copy link
Contributor

@c-randall c-randall commented Dec 23, 2024

This PR adds a build-and-test routine to test-sundials.yml for both Windows and MacOS to improve catching breaking changes on various operating systems, as suggested in PR #196.

Notes:

  • I'm not aware of a convenient way to build SUNDIALS using a variety of precisions and index sizes on Windows or MacOS, so I used builds from conda-forge (double precision, 32-bit index).
  • You may want to consider adding macos-13 to the matrix.os section. macos-latest uses arm64 architectures and macos-13 uses x86_64, so testing both would likely be more robust.
  • I only added Python 3.9 and 3.13 to the matrix.python-version section since those are the oldest and newest versions that are currently supported. Feel free to add more.

Comments:

I noticed that the tests inside packages/scikits-odes-sundials/src/scikits_odes_sundials only test the _get_num_args function, so the tests here are not particularly robust. Now that scikits-odes-sundials can be distributed as its own package, it may be worth moving over some of the more rigorous tests that are specific to odes-sundials from packages/scikits-odes/src/scikits/odes/tests.

@c-randall c-randall marked this pull request as ready for review December 23, 2024 19:58
@aragilar
Copy link
Collaborator

Can you change this to use tox, so any changes that are needed to be made can be centralised in tox (and hence avoid coupling to the specific CI system)?

@c-randall c-randall marked this pull request as draft December 31, 2024 07:27
@c-randall c-randall marked this pull request as ready for review December 31, 2024 09:33
@c-randall
Copy link
Contributor Author

c-randall commented Dec 31, 2024

I changed the new CI job to use tox, but I had an issue with the Windows and Python 3.9 combination (see failed actions). The virtual environment that tox created had an issue with pip and SSL. I tried tox --recreate and I tried getting tox from conda instead of PyPI, but neither "fix" worked. For now, I excluded this combination from the tests.

This seems to be an issue with how the runner sets up its virtual environments with tox. The previous method was working on Windows with Python 3.9, and I verified that the new tox method works on my local machine (Windows) in a virtual environment with Python 3.9, but I cannot figure out how to resolve the issue on the runner.

After this PR is closed, can you also do a v3.1.1 release that includes the fix from PR #196? Even though the PR was closed, there was no release to push the patch to PyPI.

@c-randall
Copy link
Contributor Author

@aragilar, I was able to fix the SSL issue for the Windows/py39 combination by using a different action to setup the conda environment that installs SUNDIALS. I'm now using micromamba instead of miniconda. In addition to fixing the SSL error, micromamba is much faster.

You should now be able to review and close this PR when you have time. Also, just to make sure it doesn't fall off your radar, could you please do a v3.1.1 release after closing so the patch from PR #196 is available on PyPI? Thanks!

@aragilar
Copy link
Collaborator

Cool, thanks for the changes! I think at some point we should work out how to build SUNDIALS properly on Windows/MacOS so we can test pre-release versions of SUNDIALS (so we can be more proactive about adapting to change/passing on feedback about changes), but I think if conda-forge is keeping relatively up to date with SUNDAILS, then using conda makes sense for now.

@aragilar aragilar merged commit ea608d8 into bmcage:master Jan 12, 2025
34 of 42 checks passed
@aragilar
Copy link
Collaborator

3.1.1 should appear on PyPI once the CI finished processing the tag.

@c-randall c-randall deleted the win-ci-tests branch January 15, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants