Separate deps and built caches

This commit is contained in:
Leonid Logvinov
2018-10-01 17:18:55 +02:00
parent 86cc98b245
commit 3a93c8a6e0

View File

@@ -14,10 +14,10 @@ jobs:
- restore_cache: - restore_cache:
name: Restore Yarn Package Cache name: Restore Yarn Package Cache
keys: keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }} - yarn-packages-v1-{{ .Branch }}
- yarn-packages-master - yarn-packages-v1-master
- yarn-packages- - yarn-packages-v1-
- run: - run:
name: install-yarn name: install-yarn
command: sudo npm install --global yarn@1.9.4 command: sudo npm install --global yarn@1.9.4
@@ -26,11 +26,11 @@ jobs:
command: yarn --frozen-lockfile install || yarn --frozen-lockfile install command: yarn --frozen-lockfile install || yarn --frozen-lockfile install
- save_cache: - save_cache:
name: Save Yarn Package Cache name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths: paths:
- ~/.cache/yarn - ~/.cache/yarn
- save_cache: - save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }} key: repo-deps-{{ .Environment.CIRCLE_SHA1 }}
paths: paths:
- ~/repo - ~/repo
build: build:
@@ -43,7 +43,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-deps-{{ .Environment.CIRCLE_SHA1 }}
- run: > - run: >
if [ -z "$(git diff --name-only development packages/website)" ]; then if [ -z "$(git diff --name-only development packages/website)" ]; then
yarn build:ci:no_website yarn build:ci:no_website
@@ -51,7 +51,7 @@ jobs:
yarn build:ci yarn build:ci
fi fi
- save_cache: - save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }} key: repo-built-{{ .Environment.CIRCLE_SHA1 }}
paths: paths:
- ~/repo - ~/repo
test-contracts-ganache: test-contracts-ganache:
@@ -61,7 +61,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci contracts - run: yarn wsrun test:circleci contracts
test-contracts-geth: test-contracts-geth:
docker: docker:
@@ -71,7 +71,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
# HACK(albrow): we need to sleep 10 seconds to ensure the devnet is # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is
# initialized # initialized
- run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts
@@ -84,7 +84,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:publish:circleci - run: yarn test:publish:circleci
test-doc-generation: test-doc-generation:
docker: docker:
@@ -93,7 +93,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:generate_docs:circleci - run: yarn test:generate_docs:circleci
test-rest: test-rest:
docker: docker:
@@ -102,7 +102,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0xproject/abi-gen - run: yarn wsrun test:circleci @0xproject/abi-gen
- run: yarn wsrun test:circleci @0xproject/assert - run: yarn wsrun test:circleci @0xproject/assert
- run: yarn wsrun test:circleci @0xproject/base-contract - run: yarn wsrun test:circleci @0xproject/base-contract
@@ -191,7 +191,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-deps-{{ .Environment.CIRCLE_SHA1 }}
- run: cd packages/tslint-config && yarn build:ci - run: cd packages/tslint-config && yarn build:ci
- run: yarn lerna run lint - run: yarn lerna run lint
- run: yarn prettier:ci - run: yarn prettier:ci
@@ -202,7 +202,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- run: cd packages/0x.js && yarn build:umd:prod - run: cd packages/0x.js && yarn build:umd:prod
- run: yarn bundlesize - run: yarn bundlesize
submit-coverage: submit-coverage:
@@ -212,7 +212,7 @@ jobs:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- repo-{{ .Environment.CIRCLE_SHA1 }} - repo-built-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache: - restore_cache:
keys: keys:
- coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}