From f926c8facef1a2fc468050d0af83e837832410e0 Mon Sep 17 00:00:00 2001 From: Evgenii Akentev Date: Wed, 25 Sep 2019 19:47:06 +0300 Subject: [PATCH] Add travis --- .gitignore | 2 ++ .travis.yml | 32 ++++++++++++++++++++++++++++++++ ghc-802.yaml | 1 + ghc-822.yaml | 1 + ghc-843.yaml | 1 + hazelcast-rest.cabal | 2 +- stack.yaml | 3 +++ 7 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 ghc-802.yaml create mode 100644 ghc-822.yaml create mode 100644 ghc-843.yaml create mode 100644 stack.yaml diff --git a/.gitignore b/.gitignore index f6bf791..a0e5d4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ dist dist-newstyle .ghc.environment.* +.stack-work +stack.yaml.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e5d2a77 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +# Use new container infrastructure to enable caching +sudo: false + +# Do not choose a language; we provide our own build tools. +language: generic + +env: + - STACK_YAML=stack.yaml + - STACK_YAML=ghc-802.yaml + - STACK_YAML=ghc-822.yaml + - STACK_YAML=ghc-843.yaml + +# Caching so the next build will be fast too. +cache: + directories: + - $HOME/.stack + +# Ensure necessary system libraries are present +addons: + apt: + packages: + - libgmp-dev + +before_install: +# Download and unpack the stack executable +- mkdir -p ~/.local/bin +- export PATH=$HOME/.local/bin:$PATH +- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + +script: +# Build the package, its tests, and its docs and run the tests +- stack --no-terminal --install-ghc test --haddock --no-haddock-deps diff --git a/ghc-802.yaml b/ghc-802.yaml new file mode 100644 index 0000000..010450b --- /dev/null +++ b/ghc-802.yaml @@ -0,0 +1 @@ +resolver: lts-9.0 diff --git a/ghc-822.yaml b/ghc-822.yaml new file mode 100644 index 0000000..64757d9 --- /dev/null +++ b/ghc-822.yaml @@ -0,0 +1 @@ +resolver: lts-11.0 diff --git a/ghc-843.yaml b/ghc-843.yaml new file mode 100644 index 0000000..3c8f1b1 --- /dev/null +++ b/ghc-843.yaml @@ -0,0 +1 @@ +resolver: lts-12.0 diff --git a/hazelcast-rest.cabal b/hazelcast-rest.cabal index b69132d..6f078a2 100644 --- a/hazelcast-rest.cabal +++ b/hazelcast-rest.cabal @@ -9,7 +9,7 @@ build-type: Simple cabal-version: >=1.10 library - build-depends: base >=4.10 && <5 + build-depends: base >=4.9 && <5 , bytestring >=0.10.8 , base64-bytestring , http-client >=0.5 diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..e851446 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,3 @@ +resolver: lts-14.0 +packages: + - .