yesod-auth-oauth2/.circleci/config.yml
patrick brisbin 30851ae5fb Replace checksum key with full source digest
Checksumming stack.yaml was a cargo-cult of interpreted languages, where
"build" artifacts are uniquely determined by the dependency lock file.

This approach would result in us refusing to store a new cache after
changing code (as long as it was the same resolver), and forever
recompiling any altered modules.

Computing a digest of all git-tracked files seems like the simplest way
to key compilation for now.
2018-01-23 10:16:22 -05:00

39 lines
852 B
YAML

---
version: 2.0
jobs:
build:
docker:
- image: fpco/stack-build:lts
steps:
- checkout
- run:
name: Source digest
command: git ls-files | xargs md5sum > digest
- restore_cache:
keys:
- stack-{{ .Branch }}-{{ checksum "digest" }}
- stack-{{ .Branch }}
- stack-
- run:
name: Dependencies
command: make setup
- run:
name: Build
command: make build
- save_cache:
key: stack-{{ .Branch }}-{{ checksum "digest" }}
paths:
- ~/.stack
- ./.stack-work
- run:
name: Test
command: make test
- run:
name: Lint
command: make lint
- run:
name: Build Nightly
command: make check-nightly