Circle 2.0

This commit is contained in:
patrick brisbin 2017-12-28 19:07:02 -05:00
parent 1c24a6a1e5
commit 9e0a27feab
2 changed files with 34 additions and 34 deletions

34
.circleci/config.yml Normal file
View File

@ -0,0 +1,34 @@
---
version: 2.0
jobs:
build:
docker:
- image: fpco/stack-build:lts
steps:
- checkout
- restore_cache:
keys:
- stack-{{ .Branch }}-{{ checksum "stack.yaml" }}
- stack-{{ .Branch }}
- stack-
- run:
name: Dependencies
command: make setup
- run:
name: Build
command: make build
- save_cache:
key: stack-{{ .Branch }}-{{ checksum "stack.yaml" }}
paths:
- ~/.stack
- ./.stack-work
- run:
name: Test
command: make test
- run:
name: Lint
command: make lint
- run:
name: Build Nightly
command: make check-nightly

View File

@ -1,34 +0,0 @@
---
machine:
pre:
# https://github.com/commercialhaskell/stack/issues/1658
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 10
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 10
dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v1.6.1/stack-1.6.1-linux-x86_64.tar.gz -O /tmp/stack.tar.gz
- tar xvzOf /tmp/stack.tar.gz stack-1.6.1-linux-x86_64/stack > /tmp/stack
- chmod +x /tmp/stack && sudo mv /tmp/stack /usr/bin/stack
override:
- stack setup
- stack build
--pedantic
--test --no-run-tests
--flag yesod-auth-oauth2:example
# Check compilation with nightly. If this proves problematic, add || true
# after to not fail the build.
- stack setup --resolver nightly
- stack build
--resolver nightly
--pedantic
--test --no-run-tests
--flag yesod-auth-oauth2:example
test:
override:
- stack test