Skip to content

Commit fa18e15

Browse files
committed
Regenerate .travis.yml.
1 parent 3e198eb commit fa18e15

File tree

2 files changed

+54
-47
lines changed

2 files changed

+54
-47
lines changed

.travis.yml

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# make_travis_yml_2.hs 'ekg-core.cabal'
3+
# runghc make_travis_yml_2.hs 'ekg-core.cabal'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -24,6 +24,8 @@ before_cache:
2424
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
2525
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
2626

27+
- rm -rfv $HOME/.cabal/packages/head.hackage
28+
2729
matrix:
2830
include:
2931
- compiler: "ghc-7.6.3"
@@ -38,63 +40,68 @@ matrix:
3840
- compiler: "ghc-8.0.2"
3941
# env: TEST=--disable-tests BENCH=--disable-benchmarks
4042
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
41-
- compiler: "ghc-8.2.1"
43+
- compiler: "ghc-8.2.2"
4244
# env: TEST=--disable-tests BENCH=--disable-benchmarks
43-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
45+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
4446

4547
before_install:
46-
- HC=${CC}
47-
- HCPKG=${HC/ghc/ghc-pkg}
48-
- unset CC
49-
- PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
50-
- PKGNAME='ekg-core'
48+
- HC=${CC}
49+
- HCPKG=${HC/ghc/ghc-pkg}
50+
- unset CC
51+
- ROOTDIR=$(pwd)
52+
- mkdir -p $HOME/.local/bin
53+
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
54+
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
55+
- echo $HCNUMVER
5156

5257
install:
53-
- cabal --version
54-
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
55-
- BENCH=${BENCH---enable-benchmarks}
56-
- TEST=${TEST---enable-tests}
57-
- HADDOCK=${HADDOCK-true}
58-
- INSTALLED=${INSTALLED-true}
59-
- travis_retry cabal update -v
60-
- sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
61-
- rm -fv cabal.project.local
62-
- "echo 'packages: .' > cabal.project"
63-
- rm -f cabal.project.freeze
64-
- cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
65-
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
58+
- cabal --version
59+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
60+
- BENCH=${BENCH---enable-benchmarks}
61+
- TEST=${TEST---enable-tests}
62+
- HADDOCK=${HADDOCK-true}
63+
- INSTALLED=${INSTALLED-true}
64+
- GHCHEAD=${GHCHEAD-false}
65+
- travis_retry cabal update -v
66+
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
67+
- rm -fv cabal.project cabal.project.local
68+
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
69+
- "printf 'packages: \".\"\\n' > cabal.project"
70+
- cat cabal.project
71+
- if [ -f "./configure.ac" ]; then
72+
(cd "." && autoreconf -i);
73+
fi
74+
- rm -f cabal.project.freeze
75+
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
76+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
77+
- rm -rf .ghc.environment.* "."/dist
78+
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
6679

6780
# Here starts the actual work to be performed for the package under test;
6881
# any command which exits with a non-zero exit code causes the build to fail.
6982
script:
70-
- if [ -f configure.ac ]; then autoreconf -i; fi
71-
- rm -rf .ghc.environment.* dist/
72-
- cabal sdist # test that a source-distribution can be generated
73-
- cd dist/
74-
- SRCTAR=(${PKGNAME}-*.tar.gz)
75-
- SRC_BASENAME="${SRCTAR/%.tar.gz}"
76-
- tar -xvf "./$SRC_BASENAME.tar.gz"
77-
- cd "$SRC_BASENAME/"
78-
## from here on, CWD is inside the extracted source-tarball
79-
- rm -fv cabal.project.local
80-
- "echo 'packages: .' > cabal.project"
81-
# this builds all libraries and executables (without tests/benchmarks)
82-
- rm -f cabal.project.freeze
83-
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
84-
# this builds all libraries and executables (including tests/benchmarks)
85-
# - rm -rf ./dist-newstyle
83+
# test that source-distributions can be generated
84+
- (cd "." && cabal sdist)
85+
- mv "."/dist/ekg-core-*.tar.gz ${DISTDIR}/
86+
- cd ${DISTDIR} || false
87+
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
88+
- "printf 'packages: ekg-core-*/*.cabal\\n' > cabal.project"
89+
- cat cabal.project
90+
# this builds all libraries and executables (without tests/benchmarks)
91+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
92+
93+
# Build with installed constraints for packages in global-db
94+
- if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
8695

87-
# Build with installed constraints for packages in global-db
88-
- if $INSTALLED; then
89-
echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh;
90-
else echo "Not building with installed constraints"; fi
96+
# build & run tests, build benchmarks
97+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
9198

92-
# build & run tests, build benchmarks
93-
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
99+
# cabal check
100+
- (cd ekg-core-* && cabal check)
94101

95-
# haddock
96-
- rm -rf ./dist-newstyle
97-
- if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
102+
# haddock
103+
- rm -rf ./dist-newstyle
104+
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
98105

99106
# REGENDATA ["ekg-core.cabal"]
100107
# EOF

ekg-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ category: System
1414
build-type: Simple
1515
extra-source-files: CHANGES.md
1616
cabal-version: >=1.10
17-
tested-with: GHC==8.2.1, GHC==8.0.2, GHC == 7.10.3, GHC == 7.8.4, GHC == 7.6.3
17+
tested-with: GHC==8.2.2, GHC==8.0.2, GHC == 7.10.3, GHC == 7.8.4, GHC == 7.6.3
1818

1919
library
2020
exposed-modules:

0 commit comments

Comments
 (0)