Skip to content

Try omit-local-package #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Travis job script has been generated by a script via
#
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--no-installed' 'cabal.project'
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--no-unconstrained' 'cabal.project'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
#
Expand Down Expand Up @@ -28,6 +28,9 @@ before_cache:

matrix:
include:
- compiler: "ghc-8.6.1"
env: GHCHEAD=true
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
Expand Down Expand Up @@ -91,6 +94,7 @@ matrix:

allow_failures:
- compiler: "ghc-head"
- compiler: "ghc-8.6.1"

before_install:
- HC=${CC}
Expand All @@ -108,15 +112,17 @@ install:
- BENCH=${BENCH---enable-benchmarks}
- TEST=${TEST---enable-tests}
- HADDOCK=${HADDOCK-true}
- INSTALLED=${INSTALLED-true}
- UNCONSTRAINED=${UNCONSTRAINED-true}
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
- GHCHEAD=${GHCHEAD-false}
- travis_retry cabal update -v
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
- rm -fv cabal.project cabal.project.local
# Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
- |
if $GHCHEAD; then
sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config
for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed 's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /" ${HOME}/.cabal/config; done

echo 'repository head.hackage' >> ${HOME}/.cabal/config
echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
Expand All @@ -126,11 +132,16 @@ install:
echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
echo ' key-threshold: 3' >> ${HOME}/.cabal.config

grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'

cabal new-update head.hackage -v
fi
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- "printf 'packages: \".\"\\n' > cabal.project"
- cat cabal.project
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- unix | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then
(cd "." && autoreconf -i);
fi
Expand All @@ -149,11 +160,13 @@ script:
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: unix-*/*.cabal\\n' > cabal.project"
- cat cabal.project
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- unix | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true
# this builds all libraries and executables (without tests/benchmarks)
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all


# build & run tests, build benchmarks
- cabal new-build -w ${HC} ${TEST} ${BENCH} all

Expand All @@ -164,5 +177,5 @@ script:
- rm -rf ./dist-newstyle
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi

# REGENDATA ["-o",".travis.yml","--ghc-head","--no-installed","cabal.project"]
# REGENDATA ["-o",".travis.yml","--ghc-head","--no-unconstrained","cabal.project"]
# EOF
3 changes: 2 additions & 1 deletion unix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ bug-reports: https://github.com/haskell/unix/issues
synopsis: POSIX functionality
category: System
build-type: Configure
tested-with: GHC==8.4.3, GHC==8.4.2, GHC==8.4.1,
tested-with: GHC==8.6.1,
GHC==8.4.3, GHC==8.4.2, GHC==8.4.1,
GHC==8.2.2, GHC==8.2.1,
GHC==8.0.2, GHC==8.0.1,
GHC==7.10.3, GHC==7.10.2, GHC==7.10.1,
Expand Down