yesod-auth-oauth2/.circleci/config.yml
patrick brisbin 9142acd1ab Configure non-latest CI build via STACK_YAML
So weeder will respect it as well.
2018-07-29 09:07:19 -04:00

75 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:
# Set this one via ENV var so that weeder respects it too. See
# https://github.com/ndmitchell/weeder/issues/41.
STACK_YAML: stack-lts-11.18.yaml
build_8.4.3:
<<: *stack_build
environment:
STACK_ARGUMENTS: --stack-yaml stack-lts-12.2.yaml
build:
<<: *stack_build
build_nightly:
<<: *stack_build
environment:
STACK_ARGUMENTS: --resolver nightly --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