git.iko.soy/typeable/html-parse
on master help sign in
Merge branch 'master' of github.com:bgamari/html-parse into HEAD
4215102Ben Gamari
.travis.yml+176−70
@@ -1,88 +1,194 @@
1# This Travis job script has been generated by a script via
1# This Travis job script has been generated by a script via
2#
2#
3−# make_travis_yml_2.hs 'html-parse.cabal'
3+# haskell-ci './html-parse.cabal'
4#
4#
5−# For more information, see https://github.com/hvr/multi-ghc-travis
5+# To regenerate the script (for example after adjusting tested-with) run
6#
6#
7+# haskell-ci regenerate
8+#
9+# For more information, see https://github.com/haskell-CI/haskell-ci
10+#
11+# version: 0.10
12+#
13+version: ~> 1.0
7language: c
14language: c
8−sudo: false
15+os: linux
9−
16+dist: xenial
10git:
17git:
11− submodules: false # whether to recursively clone submodules
18+ # whether to recursively clone submodules
12−
19+ submodules: false
13cache:
20cache:
14 directories:
21 directories:
15 - $HOME/.cabal/packages
22 - $HOME/.cabal/packages
16 - $HOME/.cabal/store
23 - $HOME/.cabal/store
17−
24+ - $HOME/.hlint
18before_cache:
25before_cache:
19− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
26+ - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
20 # remove files that are regenerated by 'cabal update'
27 # remove files that are regenerated by 'cabal update'
21− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
28+ - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
22− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
29+ - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
23− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
30+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
24− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
31+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
25− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
32+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
26−
33+ - rm -rfv $CABALHOME/packages/head.hackage
27−matrix:
34+jobs:
28 include:
35 include:
29− - compiler: "ghc-7.8.4"
36+ - compiler: ghc-8.10.1
30− # env: TEST=--disable-tests BENCH=--disable-benchmarks
37+ 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.1","cabal-install-3.2"]}}
31− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
38+ os: linux
39+ - compiler: ghc-8.8.3
40+ 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"]}}
41+ os: linux
42+ - compiler: ghc-8.8.2
43+ 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.2","cabal-install-3.2"]}}
44+ os: linux
45+ - compiler: ghc-8.8.1
46+ 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.1","cabal-install-3.2"]}}
47+ os: linux
48+ - compiler: ghc-8.6.5
49+ 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"]}}
50+ os: linux
51+ - compiler: ghc-8.6.4
52+ 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.4","cabal-install-3.2"]}}
53+ os: linux
54+ - compiler: ghc-8.6.3
55+ 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.3","cabal-install-3.2"]}}
56+ os: linux
57+ - compiler: ghc-8.6.2
58+ 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.2","cabal-install-3.2"]}}
59+ os: linux
60+ - compiler: ghc-8.6.1
61+ 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.1","cabal-install-3.2"]}}
62+ os: linux
63+ - compiler: ghc-8.4.4
64+ 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.4.4","cabal-install-3.2"]}}
65+ os: linux
66+ - compiler: ghc-8.4.3
67+ 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.4.3","cabal-install-3.2"]}}
68+ os: linux
69+ - compiler: ghc-8.4.2
70+ 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.4.2","cabal-install-3.2"]}}
71+ os: linux
72+ - compiler: ghc-8.4.1
73+ 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.4.1","cabal-install-3.2"]}}
74+ os: linux
75+ - compiler: ghc-8.2.2
76+ 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.2.2","cabal-install-3.2"]}}
77+ os: linux
78+ - compiler: ghc-8.2.1
79+ 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.2.1","cabal-install-3.2"]}}
80+ os: linux
81+ - compiler: ghc-8.0.2
82+ 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.0.2","cabal-install-3.2"]}}
83+ os: linux
84+ - compiler: ghc-8.0.1
85+ 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.0.1","cabal-install-3.2"]}}
86+ os: linux
87+ - compiler: ghc-7.10.3
88+ 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-7.10.3","cabal-install-3.2"]}}
89+ os: linux
32− - compiler: "ghc-7.10.3"
90+ - compiler: ghc-7.10.2
33− # env: TEST=--disable-tests BENCH=--disable-benchmarks
91+ 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-7.10.2","cabal-install-3.2"]}}
34− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
92+ os: linux
35− - compiler: "ghc-8.0.2"
93+ - compiler: ghc-7.10.1
36− # env: TEST=--disable-tests BENCH=--disable-benchmarks
94+ 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-7.10.1","cabal-install-3.2"]}}
37− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
95+ os: linux
38−
39before_install:
96before_install:
40− - HC=${CC}
97+ - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
41− - unset CC
98+ - WITHCOMPILER="-w $HC"
42− - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
99+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
43− - PKGNAME='html-parse'
100+ - HCPKG="$HC-pkg"
44−
101+ - unset CC
102+ - CABAL=/opt/ghc/bin/cabal
103+ - CABALHOME=$HOME/.cabal
104+ - export PATH="$CABALHOME/bin:$PATH"
105+ - TOP=$(pwd)
106+ - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
107+ - echo $HCNUMVER
108+ - CABAL="$CABAL -vnormal+nowrap"
109+ - set -o pipefail
110+ - TEST=--enable-tests
111+ - BENCH=--enable-benchmarks
112+ - HEADHACKAGE=false
113+ - rm -f $CABALHOME/config
114+ - |
115+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
116+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
117+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
118+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
119+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
120+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
121+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
122+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
123+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
124+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
125+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
126+ echo "install-dirs user" >> $CABALHOME/config
127+ echo " prefix: $CABALHOME" >> $CABALHOME/config
128+ echo "repository hackage.haskell.org" >> $CABALHOME/config
129+ echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
45install:
130install:
46− - cabal update && cabal install hspec-discover
47− - cabal --version
131+ - ${CABAL} --version
48− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
132+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
49− - BENCH=${BENCH---enable-benchmarks}
133+ - |
50− - TEST=${TEST---enable-tests}
134+ echo "program-default-options" >> $CABALHOME/config
135+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
136+ - cat $CABALHOME/config
137+ - rm -fv cabal.project cabal.project.local cabal.project.freeze
51− - travis_retry cabal update -v
138+ - travis_retry ${CABAL} v2-update -v
52− - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
139+ # Generate cabal.project
140+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
53− - rm -fv cabal.project.local
141+ - touch cabal.project
54− - "echo 'packages: .' > cabal.project"
142+ - |
55− - rm -f cabal.project.freeze
143+ echo "packages: ." >> cabal.project
56− - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2
144+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package html-parse' >> cabal.project ; fi
57− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2
145+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
58−
146+ - |
59−# Here starts the actual work to be performed for the package under test;
147+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(html-parse)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
60−# any command which exits with a non-zero exit code causes the build to fail.
148+ - cat cabal.project || true
149+ - cat cabal.project.local || true
150+ - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
151+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
152+ - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
153+ - rm cabal.project.freeze
154+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
155+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
61script:
156script:
62− - if [ -f configure.ac ]; then autoreconf -i; fi
157+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
63− - rm -rf dist/
158+ # Packaging...
64− - cabal sdist # test that a source-distribution can be generated
159+ - ${CABAL} v2-sdist all
65− - cd dist/
160+ # Unpacking...
66− - SRCTAR=(${PKGNAME}-*.tar.gz)
161+ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
67− - SRC_BASENAME="${SRCTAR/%.tar.gz}"
162+ - cd ${DISTDIR} || false
68− - tar -xvf "./$SRC_BASENAME.tar.gz"
163+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
69− - cd "$SRC_BASENAME/"
164+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
70−## from here on, CWD is inside the extracted source-tarball
165+ - PKGDIR_html_parse="$(find . -maxdepth 1 -type d -regex '.*/html-parse-[0-9.]*')"
71− - rm -fv cabal.project.local
166+ # Generate cabal.project
72− - "echo 'packages: .' > cabal.project"
73− # this builds all libraries and executables (without tests/benchmarks)
74− - rm -f cabal.project.freeze
167+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
75− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks
168+ - touch cabal.project
76− # this builds all libraries and executables (including tests/benchmarks)
169+ - |
77− # - rm -rf ./dist-newstyle
170+ echo "packages: ${PKGDIR_html_parse}" >> cabal.project
78− - cabal new-build -w ${HC} ${TEST} ${BENCH}
171+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package html-parse' >> cabal.project ; fi
79−
172+ - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
80− # there's no 'cabal new-test' yet, so let's emulate for now
173+ - |
81− - TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )
174+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(html-parse)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
82− - if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi
175+ - cat cabal.project || true
83− - shopt -s globstar;
176+ - cat cabal.project.local || true
84− RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
177+ # Building...
85− if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
178+ # this builds all libraries and executables (without tests/benchmarks)
86− else echo "= $T FAILED ="; RC=false; fi; done; $RC
179+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
180+ # Building with tests and benchmarks...
181+ # build & run tests, build benchmarks
182+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
183+ # Testing...
184+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
185+ # cabal check...
186+ - (cd ${PKGDIR_html_parse} && ${CABAL} -vnormal check)
187+ # haddock...
188+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
189+ # Building without installed constraints for packages in global-db...
190+ - rm -f cabal.project.local
191+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
87
192
193+# REGENDATA ("0.10",["./html-parse.cabal"])
88# EOF
194# EOF
html-parse.cabal+1−1
@@ -52,7 +52,7 @@ copyright: (c) 2016 Ben Gamari
52category: Text
52category: Text
53build-type: Simple
53build-type: Simple
54cabal-version: >=1.10
54cabal-version: >=1.10
55−tested-with: GHC==8.0.2, GHC==7.10.3, GHC==7.8.4
55+tested-with: GHC==7.10.* GHC==8.0.*, GHC==8.2.*, GHC==8.4.*, GHC==8.6.*, GHC==8.8.*, GHC==8.10.*
56
56
57
57
58source-repository head
58source-repository head