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

🏗 Clean up build cache on Travis #22926

Merged
merged 4 commits into from Jun 20, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -77,19 +77,19 @@ jobs:
script:
- unbuffer node build-system/pr-check/remote-tests.js
after_script:
- build-system/sauce_connect/stop_sauce_connect.sh
Copy link
Contributor

@rsimha rsimha Jun 19, 2019

Choose a reason for hiding this comment

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

This was intentionally duplicated because when a test task fails, the sauce connect proxy isn't stopped by the Travis job due to execOrDie. When tests pass, the second after_script call is a no-op.

- ps -ef
- stage: test
name: "End to End Tests"
script:
- unbuffer node build-system/pr-check/e2e-tests.js
after_script:
- ps -ef
cache:
directories:
- node_modules
- build-system/tasks/e2e/node_modules
- build-system/tasks/visual-diff/node_modules
- sauce_connect
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the directory to which build-system/sauce_connect/start_sauce_connect.sh downloads the proxy. Caching it avoids a fresh download for each build.

- validator/node_modules
- validator/nodejs/node_modules
- validator/webui/node_modules
- $HOME/.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.

Travis' native pip caching only works for python projects. $HOME/.cache/pip was cached based on these results.

From the logs, this line suggests that a cached install location is being used (even though, as you pointed out, the cache is updated at the end of the build). Curious: does the install time stay the same when caching is disabled?

Copy link
Collaborator Author

@estherkim estherkim Jun 19, 2019

Choose a reason for hiding this comment

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

Interesting repo! By removing it from the cache, pip install increases from 3s to 5s but store build cache decreases from 85s to 10s.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, good catch on your part in noticing the much slower store step!

yarn: true