Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Squeeze CI running times #403

Closed
astrojuanlu opened this issue Jul 10, 2018 · 6 comments
Closed

Squeeze CI running times #403

astrojuanlu opened this issue Jul 10, 2018 · 6 comments

Comments

@astrojuanlu
Copy link
Member

We optimized CI running times (#395), and we went from > 45 minutes (with timeouts) to < 30 minutes:

screenshot_2018-07-10 circleci

Now, we have to squeeze them 😉 Ideas:

  • Circle CI allows for more jobs at the same time than what we're using now, so we could split the slow tests apart in a separate job (for instance using Python 3.6, or even two Python versions). I estimate a reduction of factor 2x on the test jobs (so, from ~15 to ~7 minutes).
  • Current Circle CI executors have 2 CPUs, so we could use parallelization at the tests level, running two tests at a time. This should bring down the times another factor of 2x (so, from ~7 to ~4 minutes).
  • We should consider running the coverage job in parallel with the tests, because it's probably going to be the slowest one.
  • An alternative would be to split the coverage measurement and then combine the results as described here https://labs.ebury.rocks/2017/02/23/unit-test-execution-part-2-coverage/
  • When we make enough progress, we should also cache the installation, using some sort of lock files, as described here https://github.com/CircleCI-Public/circleci-demo-python-django/blob/master/.circleci/config.yml

So, we should be able to bring the current times from ~30 to ~10 minutes, or at least ~20.

@astrojuanlu
Copy link
Member Author

#404 brought this to 18 minutes. Next step: 10!

@astrojuanlu astrojuanlu added this to the 0.11 milestone Jul 10, 2018
@astrojuanlu
Copy link
Member Author

Caching would help in situations where the docs (the last step) fail.

@astrojuanlu
Copy link
Member Author

We should also mark some tests as slow, integration, or something. The conda-forge package currently runs everything, which is way too much.

@astrojuanlu
Copy link
Member Author

Also, it seems that there's a way to produce proper coverage reports using path aliasing in one run:

pytest-dev/pytest-cov#176

However, we have to think about this carefully, since slow tests would be even slower.

astrojuanlu added a commit to astrojuanlu/poliastro that referenced this issue Aug 30, 2018
astrojuanlu added a commit to astrojuanlu/poliastro that referenced this issue Sep 3, 2018
@astrojuanlu
Copy link
Member Author

Another thing I should do is to cache the docs dependencies or use another image. Installing texlive takes a ridiculous amount of time.

@astrojuanlu astrojuanlu modified the milestones: 0.11, 0.12 Sep 7, 2018
@astrojuanlu astrojuanlu removed this from the 0.12 milestone Dec 27, 2018
@astrojuanlu astrojuanlu added this to the 0.14 milestone Jun 3, 2019
@astrojuanlu astrojuanlu removed this from the 0.14 milestone Nov 4, 2019
@astrojuanlu
Copy link
Member Author

We completely changed the CI and now we are at around ~20-25 minutes. Definitely good enough, so closing this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant