diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2019-04-11 22:27:26 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2019-04-11 22:27:26 +0300 |
commit | b2a4ec8ae8adee00a6e4e9a8b3510212b51284fa (patch) | |
tree | 7d84c184ad5ed7c70f04d9522924a3813f3ca517 /.circleci | |
parent | 508ddaf2da3bab23c54ca10b2d20de91bf773690 (diff) |
Add CircleCI config
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..36f0768 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,78 @@ +defaults: &defaults + docker: + - image: fpco/stack-build:lts + steps: + - checkout + - run: + name: Copy provided stack.yaml to stack-build.txt + command: cp ${STACK_FILE} stack-build.txt + - restore_cache: + name: Restore Cached Dependencies + keys: + - haskell-code-explorer-{{ checksum "stack-build.txt" }} + - run: + name: Resolve/Update Dependencies + command: stack --stack-yaml=${STACK_FILE} setup + - run: + name: Build + command: stack --stack-yaml=${STACK_FILE} -j 2 build --test --no-run-tests + - run: + name: Install cabal-install + command: stack --stack-yaml=${STACK_FILE} -j 2 install cabal-install + - run: + name: Update list of packages + command: stack --stack-yaml=${STACK_FILE} exec --no-ghc-package-path cabal -- update + - run: + name: Run tests + command: stack --stack-yaml=${STACK_FILE} test || stack --stack-yaml=${STACK_FILE} exec --no-ghc-package-path $(stack --stack-yaml=${STACK_FILE} path --dist-dir)/build/test/test + - save_cache: + name: Cache Dependencies + key: haskell-code-explorer-{{ checksum "stack-build.txt" }} + paths: + - "/root/.stack" + - "/root/.cache" + - "/root/.cabal" + - ".stack-work" + +version: 2 +jobs: + ghc-8.0.2: + environment: + - STACK_FILE: "stack-8.0.2.yaml" + <<: *defaults + + ghc-8.2.2: + environment: + - STACK_FILE: "stack-8.2.2.yaml" + <<: *defaults + + ghc-8.4.3: + environment: + - STACK_FILE: "stack-8.4.3.yaml" + <<: *defaults + + ghc-8.4.4: + environment: + - STACK_FILE: "stack-8.4.4.yaml" + <<: *defaults + + ghc-8.6.3: + environment: + - STACK_FILE: "stack-8.6.3.yaml" + <<: *defaults + + ghc-8.6.4: + environment: + - STACK_FILE: "stack-8.6.4.yaml" + <<: *defaults + +workflows: + version: 2 + build_and_test: + jobs: + - ghc-8.0.2 + - ghc-8.2.2 + - ghc-8.4.3 + - ghc-8.4.4 + - ghc-8.6.3 + - ghc-8.6.4 |