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

Speed up CI builds by caching the pip directory #1241

Merged
merged 4 commits into from
Jul 14, 2020
Merged

Conversation

mdickinson
Copy link
Member

A trivial build PR to cache pip eggs.

I plan to run the CI build twice: if this worked, the second run should be appreciably faster than that first.

@mdickinson
Copy link
Member Author

First Travis CI build: Ran for 13 min 26 sec; Total time 19 min 31 sec

@mdickinson
Copy link
Member Author

Second build was better: Ran for 8 min 54 sec; Total time 18 min 59 sec

@mdickinson
Copy link
Member Author

I'll see if I can add caching for appveyor, too. Waiting for the current build to finish first.

@mdickinson
Copy link
Member Author

Waiting for the current build to finish first.

Scratch that; it was taking too long. We still expect the next Appveyor build to be slow. The one after that should be faster.

@mdickinson
Copy link
Member Author

The uncached Appveyor build took 20 min 38 sec. Have restarted.

@mdickinson mdickinson closed this Jul 13, 2020
@mdickinson mdickinson reopened this Jul 13, 2020
@mdickinson
Copy link
Member Author

Caching is now working on both Travis and Appveyor. It's not having a huge effect on Appveyor: we're down to around 17 minutes from 20 minutes, but it's better than nothing.

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with two questions.

@@ -3,6 +3,8 @@ dist: xenial
services:
- xvfb

cache: pip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if im not wrong, this means ~/.cache/pip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, $HOME/.cache/pip, according to the documentation

@@ -1,5 +1,8 @@
build: false

cache:
- C:\Users\appveyor\AppData\Local\pip\Cache -> appveyor.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if i'm not wrong, this means that the cache will be invalidated if the appveyor yaml file is updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This gives us an easy way to invalidate the cache should we need to.

@mdickinson mdickinson merged commit e16be10 into master Jul 14, 2020
@mdickinson mdickinson deleted the build/cache-pip branch July 14, 2020 08:17
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.

None yet

2 participants