Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Update Travis-CI build instructions.
Browse files Browse the repository at this point in the history
- Update ghc-8.6.2 to 8.6.3.

- We don't use installed constraints, so we don't need a separate build step
  that builds without them.

- Use latest make-travis-yml generator and drop the container-based build
  environment. Closes #10.

- Enable install-examples flag to make sure the examples get built.
  • Loading branch information
peti committed Dec 20, 2018
1 parent ce0a291 commit 5aecb99
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 10 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This Travis job script has been generated by a script via
#
# runghc make_travis_yml_2.hs '--doctest' '--hlint' '-o' '.travis.yml' 'hackage-db.cabal'
# runghc make_travis_yml_2.hs '--doctest' '--hlint' '-o' '.travis.yml' 'hackage-db.cabal' '--no-unconstrained'
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false

git:
submodules: false # whether to recursively clone submodules
Expand All @@ -28,9 +27,9 @@ before_cache:

matrix:
include:
- compiler: "ghc-8.6.2"
- compiler: "ghc-8.6.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.2], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.4"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
Expand Down Expand Up @@ -75,9 +74,10 @@ install:
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- (cd /tmp && echo '' | cabal new-repl -w ${HC} --build-dep fail)
- if [ $HCNUMVER -ge 80000 ]; then cabal new-install -w ${HC} -j2 --symlink-bindir=$HOME/.local/bin doctest --constraint='doctest ==0.16.*'; fi
- if [ $HCNUMVER -eq 80602 ]; then cabal new-install -w ${HC} -j2 --symlink-bindir=$HOME/.local/bin hlint --constraint='hlint ==2.1.*'; fi
- if [ $HCNUMVER -eq 80603 ]; then cabal new-install -w ${HC} -j2 --symlink-bindir=$HOME/.local/bin hlint --constraint='hlint ==2.1.*'; fi
- "printf 'packages: \".\"\\n' > cabal.project"
- "printf 'write-ghc-environment-files: always' >> cabal.project"
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
- "printf 'package hackage-db\\n flags: +install-examples\\n' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- hackage-db | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
Expand All @@ -100,7 +100,8 @@ script:
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: hackage-db-*/*.cabal\\n' > cabal.project"
- "printf 'write-ghc-environment-files: always' >> cabal.project"
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
- "printf 'package hackage-db\\n flags: +install-examples\\n' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- hackage-db | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
Expand All @@ -115,16 +116,13 @@ script:
- if [ $HCNUMVER -ge 80000 ]; then (cd hackage-db-* && doctest src); fi

# hlint
- if [ $HCNUMVER -eq 80602 ]; then (cd hackage-db-* && hlint src); fi
- if [ $HCNUMVER -eq 80603 ]; then (cd hackage-db-* && hlint src); fi

# cabal check
- (cd hackage-db-* && cabal check)

# haddock
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi

# Build without installed constraints for packages in global-db
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi

# REGENDATA ["--doctest","--hlint","-o",".travis.yml","hackage-db.cabal"]
# REGENDATA ["--doctest","--hlint","-o",".travis.yml","hackage-db.cabal","--no-unconstrained"]
# EOF
2 changes: 1 addition & 1 deletion hackage-db.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ synopsis: Access cabal-install's Hackage database via Data.Map
cabal-version: >= 1.10
build-type: Simple
tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2
, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.3

description:
This library provides convenient access to the local copy of the Hackage
Expand Down

0 comments on commit 5aecb99

Please sign in to comment.