From 0c2935562f3b05ebf365512a80effff985b86273 Mon Sep 17 00:00:00 2001 From: Maxim Koltsov Date: Thu, 5 Nov 2020 13:30:57 +0300 Subject: [PATCH] Bump version, support GHC-8.10 --- .travis.yml | 32 +++++++++++++++++++------------- cabal.haskell-ci | 13 +++++++++++++ cabal.project | 5 ----- example/example.cabal | 3 ++- servant-openapi3.cabal | 5 +++-- 5 files changed, 37 insertions(+), 21 deletions(-) create mode 100644 cabal.haskell-ci diff --git a/.travis.yml b/.travis.yml index 1f794a3..5cd364b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ # This Travis job script has been generated by a script via # -# haskell-ci 'cabal.project' +# haskell-ci 'cabal.project' '--config' 'cabal.haskell-ci' # # To regenerate the script (for example after adjusting tested-with) run # @@ -8,7 +8,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.10.1 +# version: 0.10.3 # version: ~> 1.0 language: c @@ -17,6 +17,9 @@ dist: xenial git: # whether to recursively clone submodules submodules: false +branches: + only: + - master cache: directories: - $HOME/.cabal/packages @@ -33,8 +36,11 @@ before_cache: - rm -rfv $CABALHOME/packages/head.hackage jobs: include: - - compiler: ghc-8.8.3 - addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}} + - compiler: ghc-8.10.2 + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.2","cabal-install-3.2"]}} + os: linux + - compiler: ghc-8.8.4 + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.4","cabal-install-3.2"]}} os: linux - compiler: ghc-8.6.5 addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}} @@ -96,10 +102,6 @@ install: - echo 'package example' >> cabal.project - "echo ' ghc-options: -Werror=missing-methods' >> cabal.project" - | - echo "source-repository-package" >> cabal.project - echo " type: git" >> cabal.project - echo " location: https://github.com/biocad/openapi3/" >> cabal.project - echo " tag: bd9df532f2381c4b22fe86ef722715088f5cfa68" >> cabal.project - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(example|servant-openapi3)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true - cat cabal.project.local || true @@ -132,10 +134,6 @@ script: - echo 'package example' >> cabal.project - "echo ' ghc-options: -Werror=missing-methods' >> cabal.project" - | - echo "source-repository-package" >> cabal.project - echo " type: git" >> cabal.project - echo " location: https://github.com/biocad/openapi3/" >> cabal.project - echo " tag: bd9df532f2381c4b22fe86ef722715088f5cfa68" >> cabal.project - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(example|servant-openapi3)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true - cat cabal.project.local || true @@ -155,6 +153,14 @@ script: # Building without installed constraints for packages in global-db... - rm -f cabal.project.local - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all + # Constraint sets + - rm -rf cabal.project.local + # Constraint set servant-0.17 + - if [ $HCNUMVER -lt 81000 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all ; fi + # Constraint set servant-0.18.0 + - if [ $HCNUMVER -ge 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.0.*' all ; fi + # Constraint set servant-0.18.1 + - if [ $HCNUMVER -ge 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.1.*' all ; fi -# REGENDATA ("0.10.1",["cabal.project"]) +# REGENDATA ("0.10.3",["cabal.project","--config","cabal.haskell-ci"]) # EOF diff --git a/cabal.haskell-ci b/cabal.haskell-ci new file mode 100644 index 0000000..e56d885 --- /dev/null +++ b/cabal.haskell-ci @@ -0,0 +1,13 @@ +branches: master + +constraint-set servant-0.17 + ghc: >= 8.0 && <8.10 + constraints: servant ==0.17.* + +constraint-set servant-0.18.0 + ghc: >= 8.8 && <8.12 + constraints: servant ==0.18.0.* + +constraint-set servant-0.18.1 + ghc: >= 8.8 && <8.12 + constraints: servant ==0.18.1.* diff --git a/cabal.project b/cabal.project index 0527dc9..22bec73 100644 --- a/cabal.project +++ b/cabal.project @@ -2,8 +2,3 @@ packages: servant-openapi3.cabal, example/example.cabal tests: true - -source-repository-package - type: git - location: https://github.com/biocad/openapi3/ - tag: bd9df532f2381c4b22fe86ef722715088f5cfa68 diff --git a/example/example.cabal b/example/example.cabal index 652f83e..764e612 100644 --- a/example/example.cabal +++ b/example/example.cabal @@ -16,7 +16,8 @@ data-files: tested-with: GHC ==8.4.4 || ==8.6.5 - || ==8.8.3 + || ==8.8.4 + || ==8.10.2 library ghc-options: -Wall diff --git a/servant-openapi3.cabal b/servant-openapi3.cabal index f8e5425..d365b70 100644 --- a/servant-openapi3.cabal +++ b/servant-openapi3.cabal @@ -1,5 +1,5 @@ name: servant-openapi3 -version: 2.0.0.1 +version: 2.0.1.0 synopsis: Generate a Swagger/OpenAPI/OAS 3.0 specification for your servant API. description: Swagger is a project used to describe and document RESTful APIs. The core of the @@ -31,7 +31,8 @@ cabal-version: 1.18 tested-with: GHC ==8.4.4 || ==8.6.5 - || ==8.8.3 + || ==8.8.4 + || ==8.10.2 extra-source-files: README.md