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 caching to CircleCI #320

Merged
merged 1 commit into from Jun 6, 2019
Merged
Changes from all 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
10 changes: 10 additions & 0 deletions .circleci/config.yml
Expand Up @@ -6,6 +6,12 @@ jobs:
- image: circleci/node:10.15
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- dependencies-{{ checksum "common/config/shrinkwrap.yaml" }}
# fallback to using the latest cache if no exact match is found
- dependencies-
- run:
name: Misk-Web Prebuild...
command: sudo npm install -g @misk/cli && miskweb prebuild -e
Expand All @@ -15,6 +21,10 @@ jobs:
- run:
name: Installing...
command: node common/scripts/install-run-rush.js install
- save_cache:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this happen regardless of whether or not the shrinkwrap.yaml has changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My understanding is that it saves every time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we care/can we avoid that when there's no update?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Otherwise lgtm

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair question, if it net doesn't improves build times I'll revert. Not sure if that type of logic can be added or it may already be implicitly happening if there's a key match on save.

paths:
- common/temp
key: dependencies-{{ checksum "common/config/shrinkwrap.yaml" }}
- run:
name: Building...
command: node common/scripts/install-run-rush.js rebuild --verbose
Expand Down