Skip to content

Look into using mamba instead of conda for CI jobs #1472

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

Closed
kandersolar opened this issue Jun 15, 2022 · 0 comments · Fixed by #1493
Closed

Look into using mamba instead of conda for CI jobs #1472

kandersolar opened this issue Jun 15, 2022 · 0 comments · Fixed by #1493

Comments

@kandersolar
Copy link
Member

Is your feature request related to a problem? Please describe.
One step in our pytest CI jobs is setting up a conda environment. Setting up that environment can be a large fraction of total job execution time. Here's an example job run where 5 out of the total 8 minutes were spent setting up the conda environment. It would be nice to speed this up somehow; faster jobs means less time spent twiddling thumbs waiting for tests to pass and are a more responsible use of the free CI services GitHub provides to us.

Describe the solution you'd like
Mamba is supposedly a faster drop-in replacement for conda, so using mamba instead of conda in our CI jobs might speed them up without much hassle.

As suggested by @wholmgren in #1306 (comment), the micromamba github action might be one way to do this. This method pandas uses seems worth exploring too: https://github.com/pandas-dev/pandas/blob/3b6015f24f088597846c757b1e9f85e6e379ece7/.github/actions/setup-conda/action.yml#L35

Describe alternatives you've considered
Cached environments may be another option. In general I am wary of persisting anything between CI sessions for fear of introducing some difficult-to-debug state issue, but if it can be done robustly then it may be worthwhile here.

Additional context
Starting with the pytest jobs probably makes the most sense, but it might be possible to use mamba for the asv job as well. But see airspeed-velocity/asv#970

jules-ch added a commit to jules-ch/pvlib-python that referenced this issue Jul 13, 2022
- Replace conda setup with micromamba
- Reduce fetch depth for checkout
- Fetch tags for version inference
- Install pvlib from source before testing

Closes pvlib#1472
@jules-ch jules-ch mentioned this issue Jul 13, 2022
6 tasks
jules-ch added a commit to jules-ch/pvlib-python that referenced this issue Jul 13, 2022
- Replace conda setup with micromamba
- Reduce fetch depth for checkout
- Fetch tags for version inference
- Install pvlib from source before testing

Closes pvlib#1472
@kandersolar kandersolar added this to the 0.9.2 milestone Jul 13, 2022
kandersolar added a commit that referenced this issue Jul 19, 2022
- Replace conda setup with micromamba
- Reduce fetch depth for checkout
- Fetch tags for version inference
- Install pvlib from source before testing

Closes #1472

Co-authored-by: Kevin Anderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant