--- version: 2.0 references: stack_build: &stack_build docker: # https://github.com/haskell-works/stack-build/blob/master/minimal/Dockerfile - image: quay.io/haskell_works/stack-build-minimal steps: - checkout - run: name: Upgrade Stack command: stack upgrade - run: name: Digest command: | echo -- "$STACK_ARGUMENTS" > rdigest git ls-files | xargs md5sum > sdigest - restore_cache: keys: - v2-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} - v2-{{ .Branch }}-{{ checksum "rdigest" }}- - v2-{{ .Branch }}- - v2-master- - run: name: Dependencies command: make setup - run: name: Build command: make build - save_cache: # yamllint disable-line rule:line-length key: v2-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} paths: - ~/.stack - ./.stack-work - run: name: Test command: make test - run: name: Lint command: | if [ "${LINT:-1}" = 1 ]; then make lint fi 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: # weeder is not happy, again # https://circleci.com/gh/thoughtbot/yesod-auth-oauth2/375 LINT: 0 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