yesod-auth-oauth2/.circleci/config.yml
patrick brisbin f46d3bc956 Tweak CI environment variables
- Always use STACK_YAML, because we sometimes do
- Pass --no-terminal for better output
2018-09-11 08:00:30 -04:00

76 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: make lint
jobs:
build_8.2.2:
<<: *stack_build
environment:
STACK_ARGUMENTS: --no-terminal
STACK_YAML: stack-lts-11.18.yaml
build_8.4.3:
<<: *stack_build
environment:
STACK_ARGUMENTS: --no-terminal
STACK_YAML: stack-lts-12.2.yaml
build:
<<: *stack_build
build_nightly:
<<: *stack_build
environment:
STACK_ARGUMENTS: --resolver nightly --no-terminal
STACK_YAML: stack-nightly.yaml
workflows:
version: 2
commit:
jobs:
- build_8.2.2
- build_8.4.3
- build
- build_nightly
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- build_nightly