mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-12 04:08:30 +01:00
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.
This commit is contained in:
parent
b25ddab6f6
commit
30851ae5fb
@ -7,9 +7,13 @@ jobs:
|
||||
- image: fpco/stack-build:lts
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Source digest
|
||||
command: git ls-files | xargs md5sum > digest
|
||||
|
||||
- restore_cache:
|
||||
keys:
|
||||
- stack-{{ .Branch }}-{{ checksum "stack.yaml" }}
|
||||
- stack-{{ .Branch }}-{{ checksum "digest" }}
|
||||
- stack-{{ .Branch }}
|
||||
- stack-
|
||||
- run:
|
||||
@ -19,7 +23,7 @@ jobs:
|
||||
name: Build
|
||||
command: make build
|
||||
- save_cache:
|
||||
key: stack-{{ .Branch }}-{{ checksum "stack.yaml" }}
|
||||
key: stack-{{ .Branch }}-{{ checksum "digest" }}
|
||||
paths:
|
||||
- ~/.stack
|
||||
- ./.stack-work
|
||||
|
||||
Loading…
Reference in New Issue
Block a user