From 471482d3a141b03c5a30824c767e6dced950118f Mon Sep 17 00:00:00 2001 From: Yishuai Li Date: Wed, 4 Nov 2020 20:59:42 -0500 Subject: [PATCH] travis: Add Stack and GHC 8.8 --- .gitignore | 20 ++++++++++++++++++ .travis.yml | 55 ++++++++++++++++++++++++++++++------------------ http-proxy.cabal | 30 +++++++++++++------------- stack-8.0.yaml | 2 ++ stack-8.2.yaml | 2 ++ stack-8.4.yaml | 2 ++ stack-8.6.yaml | 2 ++ stack.yaml | 2 +- 8 files changed, 78 insertions(+), 37 deletions(-) create mode 100644 stack-8.0.yaml create mode 100644 stack-8.2.yaml create mode 100644 stack-8.4.yaml create mode 100644 stack-8.6.yaml diff --git a/.gitignore b/.gitignore index e047338..952ab90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,15 @@ +dist +dist-* +cabal-dev *.o *.hi +*.hie +*.chi +*.chs.h +*.dyn_o +*.dyn_hi +.hpc +.hsenv .cabal-sandbox cabal.sandbox.config connect-test @@ -8,3 +18,13 @@ simple-proxy testsuite request-rewrite-proxy spellTmp.bak +*.prof +*.aux +*.hp +*.eventlog +.stack-work/ +cabal.project.local +cabal.project.local~ +.HTF/ +.ghc.environment.* +*.yaml.lock diff --git a/.travis.yml b/.travis.yml index 8f5869e..4f36a66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,44 @@ -sudo: required -language: c +--- +language: haskell +cabal: "3.4" os: linux dist: xenial -env: - - GHCVER=8.0.2 - - GHCVER=8.2.2 - - GHCVER=8.4.4 - - GHCVER=8.6.4 +# Caching so the next build will be fast too. +cache: + directories: + - $HOME/.cabal + - $HOME/.stack + - $TRAVIS_BUILD_DIR/.stack-work + - $TRAVIS_BUILD_DIR/dist-newstyle before_install: - - sudo add-apt-repository -y ppa:hvr/ghc - - sudo apt-get update - - sudo apt-get install cabal-install-1.24 ghc-$GHCVER - - export PATH=/opt/cabal/bin:/opt/ghc/$GHCVER/bin:$PATH + # Download and unpack the stack executable + - mkdir -p ~/.local/bin + - export PATH=$HOME/.local/bin:$PATH + - > + travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz + | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + # Configure stack to use the system GHC installation + - stack config set system-ghc --global true install: - - cabal-1.24 update - - cabal-1.24 install --only-dependencies --enable-tests - -script: - - cabal-1.24 configure --enable-tests - - cabal-1.24 build - - dist/build/test/test - - dist/build/test-io/test-io - - cabal-1.24 haddock - - cabal-1.24 sdist + - cabal install --only-dependencies --overwrite-policy=always +after_script: + - cabal haddock + - cabal sdist + - stack --no-terminal test +jobs: + include: + - ghc: "8.0" + env: STACK_YAML=stack-8.0.yaml + - ghc: "8.2" + env: STACK_YAML=stack-8.2.yaml + - ghc: "8.4" + env: STACK_YAML=stack-8.4.yaml + - ghc: "8.6" + env: STACK_YAML=stack-8.6.yaml + - ghc: "8.8" diff --git a/http-proxy.cabal b/http-proxy.cabal index 1838777..7c4c448 100644 --- a/http-proxy.cabal +++ b/http-proxy.cabal @@ -40,27 +40,27 @@ library Network.HTTP.Proxy.Request build-depends: base >= 4 && < 5 - , async == 2.2.* + , async >= 2.0.2 && < 2.3 , blaze-builder == 0.4.* , bytestring == 0.10.* - , bytestring-lexing == 0.5.* + , bytestring-lexing >= 0.4.3.3 && < 0.6 , case-insensitive == 1.2.* - , conduit == 1.3.* - , conduit-extra == 1.3.* - , http-client == 0.6.* - , http-conduit == 2.3.* - , http-types == 0.12.* - , mtl == 2.2.* - , network == 2.8.* - , resourcet == 1.2.* - , streaming-commons == 0.2.* - , tls == 1.4.* + , conduit >= 1.2.5 && < 1.4 + , conduit-extra >= 1.1.9.1 && < 1.4 + , http-client >= 0.5.7.1 && < 0.7 + , http-conduit >= 2.2.4 && < 2.4 + , http-types >= 0.8.6 && < 0.13 + , mtl >= 2.1.3.1 && < 2.3 + , network >= 2.6.2.1 && < 3.2 + , resourcet >= 1.1.6 && < 1.3 + , streaming-commons >= 0.1.12.1 && < 0.3 + , tls >= 1.2.18 && < 1.6 , text == 1.2.* , transformers == 0.5.* - , wai == 3.2.* + , wai >= 3.0.3.0 && < 3.3 , wai-conduit == 3.0.* - , warp == 3.2.* - , warp-tls == 3.2.* + , warp >= 3.0.13.1 && < 3.4 + , warp-tls >= 3.0.4.2 && < 3.3 diff --git a/stack-8.0.yaml b/stack-8.0.yaml new file mode 100644 index 0000000..906ed0d --- /dev/null +++ b/stack-8.0.yaml @@ -0,0 +1,2 @@ +--- +resolver: lts-9.21 diff --git a/stack-8.2.yaml b/stack-8.2.yaml new file mode 100644 index 0000000..c7dbbcf --- /dev/null +++ b/stack-8.2.yaml @@ -0,0 +1,2 @@ +--- +resolver: lts-11.22 diff --git a/stack-8.4.yaml b/stack-8.4.yaml new file mode 100644 index 0000000..e681a17 --- /dev/null +++ b/stack-8.4.yaml @@ -0,0 +1,2 @@ +--- +resolver: lts-12.26 diff --git a/stack-8.6.yaml b/stack-8.6.yaml new file mode 100644 index 0000000..cfb34ee --- /dev/null +++ b/stack-8.6.yaml @@ -0,0 +1,2 @@ +--- +resolver: lts-14.27 diff --git a/stack.yaml b/stack.yaml index 84c1ac5..5faafcc 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-2.21 +resolver: lts-16.20