Skip to content

Commit 1d634d4

Browse files
committed
Regenerate .travis
1 parent 7e5e758 commit 1d634d4

File tree

2 files changed

+98
-80
lines changed

2 files changed

+98
-80
lines changed

.travis.yml

Lines changed: 97 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,118 @@
1-
# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
1+
# This Travis job script has been generated by a script via
2+
#
3+
# haskell-ci '--output' '.travis.yml' 'lhs2tex.cabal'
4+
#
5+
# For more information, see https://github.com/haskell-CI/haskell-ci
6+
#
7+
# version: 0.1.0.0
8+
#
29
language: c
3-
sudo: false
10+
dist: xenial
11+
12+
git:
13+
submodules: false # whether to recursively clone submodules
414

515
cache:
616
directories:
7-
- $HOME/.cabsnap
817
- $HOME/.cabal/packages
18+
- $HOME/.cabal/store
919

1020
before_cache:
11-
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
12-
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
21+
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
22+
# remove files that are regenerated by 'cabal update'
23+
- rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
24+
- rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
25+
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
26+
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
27+
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
28+
29+
- rm -rfv $CABALHOME/packages/head.hackage
1330

1431
matrix:
1532
include:
16-
- env: CABALVER=1.16 GHCVER=7.4.2
17-
compiler: ": #GHC 7.4.2"
18-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
19-
- env: CABALVER=1.16 GHCVER=7.6.3
20-
compiler: ": #GHC 7.6.3"
21-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
22-
- env: CABALVER=1.18 GHCVER=7.8.4
23-
compiler: ": #GHC 7.8.4"
24-
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
25-
- env: CABALVER=1.22 GHCVER=7.10.3
26-
compiler: ": #GHC 7.10.3"
27-
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
28-
- env: CABALVER=1.24 GHCVER=8.0.2
29-
compiler: ": #GHC 8.0.2"
30-
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
31-
- env: CABALVER=2.0 GHCVER=8.2.2
32-
compiler: ": #GHC 8.2.1"
33-
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
34-
- env: CABALVER=2.2 GHCVER=8.4.3
35-
compiler: ": #GHC 8.4.1"
36-
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
37-
- env: CABALVER=2.4 GHCVER=8.6.1
38-
compiler: ": #GHC 8.6.1"
39-
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
33+
- compiler: "ghc-8.6.3"
34+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
35+
- compiler: "ghc-8.4.4"
36+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
37+
- compiler: "ghc-8.2.1"
38+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.1], sources: [hvr-ghc]}}
39+
- compiler: "ghc-8.0.2"
40+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
41+
- compiler: "ghc-7.10.3"
42+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
43+
- compiler: "ghc-7.8.4"
44+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
45+
- compiler: "ghc-7.6.3"
46+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
47+
- compiler: "ghc-7.4.2"
48+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.4.2], sources: [hvr-ghc]}}
4049

4150
before_install:
42-
- unset CC
43-
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
51+
- HC=/opt/ghc/bin/${CC}
52+
- HCPKG=${HC/ghc/ghc-pkg}
53+
- unset CC
54+
- CABAL=/opt/ghc/bin/cabal
55+
- CABALHOME=$HOME/.cabal
56+
- export PATH="$CABALHOME/bin:$PATH"
57+
- ROOTDIR=$(pwd)
58+
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
59+
- echo $HCNUMVER
4460

4561
install:
46-
- cabal --version
47-
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
48-
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
49-
then
50-
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
51-
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
52-
fi
53-
- travis_retry cabal update -v
54-
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
55-
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
56-
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
57-
58-
# check whether current requested install-plan matches cached package-db snapshot
59-
- if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
60-
then
61-
echo "cabal build-cache HIT";
62-
rm -rfv .ghc;
63-
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
64-
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
65-
else
66-
echo "cabal build-cache MISS";
67-
rm -rf $HOME/.cabsnap;
68-
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
69-
cabal install --only-dependencies --enable-tests --enable-benchmarks;
70-
fi
71-
72-
# snapshot package-db on cache miss
73-
- if [ ! -d $HOME/.cabsnap ];
74-
then
75-
echo "snapshotting package-db to build-cache";
76-
mkdir $HOME/.cabsnap;
77-
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
78-
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
79-
fi
80-
81-
before_script:
82-
- touch doc/Guide2.pdf
62+
- ${CABAL} --version
63+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
64+
- TEST=--enable-tests
65+
- BENCH=--enable-benchmarks
66+
- GHCHEAD=${GHCHEAD-false}
67+
- travis_retry ${CABAL} update -v
68+
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
69+
- rm -fv cabal.project cabal.project.local
70+
- grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
71+
- rm -f cabal.project
72+
- touch cabal.project
73+
- "printf 'packages: \".\"\\n' >> cabal.project"
74+
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
75+
- touch cabal.project.local
76+
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(lhs2tex)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
77+
- cat cabal.project || true
78+
- cat cabal.project.local || true
79+
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
80+
- rm -f cabal.project.freeze
81+
- ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
82+
- "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
83+
- rm "cabal.project.freeze"
84+
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
85+
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
86+
- rm -rf .ghc.environment.* "."/dist
87+
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
8388

8489
# Here starts the actual work to be performed for the package under test;
8590
# any command which exits with a non-zero exit code causes the build to fail.
8691
script:
87-
- if [ -f configure.ac ]; then autoreconf -i; fi
88-
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
89-
- cabal build # this builds all libraries and executables (including tests/benchmarks)
90-
- cabal test
91-
- cabal check
92-
- cabal sdist # tests that a source-distribution can be generated
92+
# test that source-distributions can be generated
93+
- ${CABAL} new-sdist all
94+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
95+
- cd ${DISTDIR} || false
96+
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
97+
- rm -f cabal.project
98+
- touch cabal.project
99+
- "printf 'packages: \"lhs2tex-*/*.cabal\"\\n' >> cabal.project"
100+
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
101+
- touch cabal.project.local
102+
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(lhs2tex)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
103+
- cat cabal.project || true
104+
- cat cabal.project.local || true
105+
# this builds all libraries and executables (without tests/benchmarks)
106+
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
107+
108+
# build & run tests, build benchmarks
109+
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
110+
111+
# cabal check
112+
- (cd lhs2tex-* && ${CABAL} check)
93113

94-
# Check that the resulting source distribution can be built & installed.
95-
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
96-
# `cabal install --force-reinstalls dist/*-*.tar.gz`
97-
# - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
98-
# (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
114+
# Build without installed constraints for packages in global-db
115+
- rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all;
99116

117+
# REGENDATA ["--output",".travis.yml","lhs2tex.cabal"]
100118
# EOF

lhs2tex.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ description:
2424
be invoked in another mode to just extract the Haskell code.
2525
category: Development, Language
2626
build-type: Custom
27-
tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1, GHC == 8.4.3, GHC == 8.6.1
27+
tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1, GHC == 8.4.4, GHC == 8.6.3
2828
extra-source-files: AUTHORS
2929
CHANGELOG.md
3030
INSTALL

0 commit comments

Comments
 (0)