diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..0a498ec --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index b0af040..0000000 --- a/circle.yml +++ /dev/null @@ -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