yesod-auth-oauth2/.circleci/config.yml
2018-01-26 12:18:46 -05:00

73 lines
1.7 KiB
YAML

---
version: 2.0
references:
stack_build: &stack_build
docker:
- image: fpco/stack-build:lts
steps:
- checkout
- run:
name: Digest
command: |
echo -- "$STACK_ARGUMENTS" > rdigest
git ls-files | xargs md5sum > sdigest
- restore_cache:
keys:
- 1-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }}
- 1-{{ .Branch }}-{{ checksum "rdigest" }}-
- 1-{{ .Branch }}-
- 1-master-
- run:
name: Dependencies
command: make setup
- run:
name: Build
command: make build
- save_cache:
key: 1-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }}
paths:
- ~/.stack
- ./.stack-work
- run:
name: Test
command: make test
- run:
name: Lint
command: |
if [ "${LINT:-1}" -eq 0 ]; then
echo "[LINT=0] Lint step skipped." >&2
else
make lint
fi
jobs:
build_7.10.3:
<<: *stack_build
environment:
STACK_ARGUMENTS: --resolver lts-6.35
build_8.0.2:
<<: *stack_build
environment:
# FIXME: https://circleci.com/gh/thoughtbot/yesod-auth-oauth2/115
LINT: "0"
STACK_ARGUMENTS: --resolver lts-9.21
build_8.2.2:
<<: *stack_build
environment:
STACK_ARGUMENTS: --resolver lts-10.3
build_nightly:
<<: *stack_build
environment:
STACK_ARGUMENTS: --resolver nightly
workflows:
version: 2
builds:
jobs:
# FIXME: https://circleci.com/gh/thoughtbot/yesod-auth-oauth2/113
# - build_7.10.3
- build_8.0.2
- build_8.2.2
- build_nightly