git.iko.soy/typeable/attoparsec
on master help sign in
Regenerate .travis.yml
commit255443655bb382c56b03dad841562407d45b036d authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 13 Aug 2019, 17:52 (7 years ago) parent566f1e4
2 files changed+138−97
.travis.yml+137−96 attoparsec.cabal+1−1
.travis.yml+137−96
@@ -1,121 +1,162 @@
11# This Travis job script has been generated by a script via
22#
3−# runghc make_travis_yml_2.hs 'attoparsec.cabal'
3+# haskell-ci '--tests-jobs=>=7.4' '--no-benchmarks' 'attoparsec.cabal'
44#
5−# For more information, see https://github.com/hvr/multi-ghc-travis
5+# For more information, see https://github.com/haskell-CI/haskell-ci
6+#
7+# version: 0.3.20190804.2
68#
79language: c
8−sudo: false
9−
10−# Bryan threatens to turn off Travis-CI if he gets any email :-)
11−notifications:
12− email: false
13−
10+dist: xenial
11+sudo: required
1412git:
15− submodules: false # whether to recursively clone submodules
16−
13+ # whether to recursively clone submodules
14+ submodules: false
1715cache:
1816 directories:
1917 - $HOME/.cabal/packages
2018 - $HOME/.cabal/store
21−
2219before_cache:
23− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
20+ - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2421 # remove files that are regenerated by 'cabal update'
25− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
26− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
27− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
28− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
29− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
30−
31− - rm -rfv $HOME/.cabal/packages/head.hackage
32−
22+ - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
23+ - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
24+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
25+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
26+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
27+ - rm -rfv $CABALHOME/packages/head.hackage
3328matrix:
3429 include:
35− - compiler: "ghc-7.0.4"
36− env: TEST=--disable-tests BENCH=--disable-benchmarks
37− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.0.4], sources: [hvr-ghc]}}
38− - compiler: "ghc-7.2.2"
39− env: TEST=--disable-tests BENCH=--disable-benchmarks
40− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.2.2], sources: [hvr-ghc]}}
41− - compiler: "ghc-7.4.2"
42− env: TEST=--disable-tests BENCH=--disable-benchmarks
43− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.4.2], sources: [hvr-ghc]}}
44− - compiler: "ghc-7.6.3"
45− env: TEST=--disable-tests BENCH=--disable-benchmarks
46− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
47− - compiler: "ghc-7.8.4"
48− env: BENCH=--disable-benchmarks
49− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
50− - compiler: "ghc-7.10.3"
51− env: BENCH=--disable-benchmarks
52− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
53− - compiler: "ghc-8.0.2"
54− env: BENCH=--disable-benchmarks
55− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
56− - compiler: "ghc-8.2.2"
57− env: BENCH=--disable-benchmarks
58− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
59−
30+ - compiler: ghc-8.8.1
31+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
32+ - compiler: ghc-8.6.5
33+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
34+ - compiler: ghc-8.4.4
35+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
36+ - compiler: ghc-8.2.2
37+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
38+ - compiler: ghc-8.0.2
39+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
40+ - compiler: ghc-7.10.3
41+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-2.4"]}}
42+ - compiler: ghc-7.8.4
43+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-2.4"]}}
44+ - compiler: ghc-7.6.3
45+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.3","cabal-install-2.4"]}}
46+ - compiler: ghc-7.4.2
47+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.2","cabal-install-2.4"]}}
48+ - compiler: ghc-7.2.2
49+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.2.2","cabal-install-2.4"]}}
50+ - compiler: ghc-7.0.4
51+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.0.4","cabal-install-2.4"]}}
6052before_install:
61− - HC=${CC}
62− - HCPKG=${HC/ghc/ghc-pkg}
53+ - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
54+ - WITHCOMPILER="-w $HC"
55+ - HCPKG="$HC-pkg"
6356 - unset CC
64− - ROOTDIR=$(pwd)
65− - mkdir -p $HOME/.local/bin
66− - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
67− - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
57+ - CABAL=/opt/ghc/bin/cabal
58+ - CABALHOME=$HOME/.cabal
59+ - export PATH="$CABALHOME/bin:$PATH"
60+ - TOP=$(pwd)
61+ - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
6862 - echo $HCNUMVER
69−
63+ - CABAL="$CABAL -vnormal+nowrap+markoutput"
64+ - set -o pipefail
65+ - |
66+ echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
67+ echo 'BEGIN { state = "output"; }' >> .colorful.awk
68+ echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
69+ echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
70+ echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
71+ echo ' if (state == "cabal") {' >> .colorful.awk
72+ echo ' print blue($0)' >> .colorful.awk
73+ echo ' } else {' >> .colorful.awk
74+ echo ' print $0' >> .colorful.awk
75+ echo ' }' >> .colorful.awk
76+ echo '}' >> .colorful.awk
77+ - cat .colorful.awk
78+ - |
79+ color_cabal_output () {
80+ awk -f $TOP/.colorful.awk
81+ }
82+ - echo text | color_cabal_output
7083install:
71− - cabal --version
84+ - ${CABAL} --version
7285 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
73− - BENCH=${BENCH---enable-benchmarks}
74− - TEST=${TEST---enable-tests}
75− - HADDOCK=${HADDOCK-true}
76− - INSTALLED=${INSTALLED-true}
77− - GHCHEAD=${GHCHEAD-false}
78− - travis_retry cabal update -v
79− - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
80− - rm -fv cabal.project cabal.project.local
81− - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
82− - "printf 'packages: \".\"\\n' > cabal.project"
83− - cat cabal.project
84− - if [ -f "./configure.ac" ]; then
85− (cd "." && autoreconf -i);
86− fi
87− - rm -f cabal.project.freeze
88− - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
89− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
90− - rm -rf "."/.ghc.environment.* "."/dist
91− - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
92−
93−# Here starts the actual work to be performed for the package under test;
94−# any command which exits with a non-zero exit code causes the build to fail.
86+ - TEST=--enable-tests
87+ - if [ $HCNUMVER -ge 70000 ] && [ $HCNUMVER -lt 70400 ] ; then TEST=--disable-tests ; fi
88+ - BENCH=--enable-benchmarks
89+ - BENCH=--disable-benchmarks
90+ - HEADHACKAGE=false
91+ - rm -f $CABALHOME/config
92+ - |
93+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
94+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
95+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
96+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
97+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
98+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
99+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
100+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
101+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
102+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
103+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
104+ echo "install-dirs user" >> $CABALHOME/config
105+ echo " prefix: $CABALHOME" >> $CABALHOME/config
106+ echo "repository hackage.haskell.org" >> $CABALHOME/config
107+ echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
108+ - cat $CABALHOME/config
109+ - rm -fv cabal.project cabal.project.local cabal.project.freeze
110+ - travis_retry ${CABAL} v2-update -v
111+ # Generate cabal.project
112+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
113+ - touch cabal.project
114+ - |
115+ echo "packages: ." >> cabal.project
116+ - |
117+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(attoparsec)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
118+ - cat cabal.project || true
119+ - cat cabal.project.local || true
120+ - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
121+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
122+ - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
123+ - rm cabal.project.freeze
124+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
125+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
95126script:
96− # test that source-distributions can be generated
97− - (cd "." && cabal sdist)
98− - mv "."/dist/attoparsec-*.tar.gz ${DISTDIR}/
127+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
128+ # Packaging...
129+ - ${CABAL} v2-sdist all | color_cabal_output
130+ # Unpacking...
131+ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
99132 - cd ${DISTDIR} || false
100− - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
101− - "printf 'packages: attoparsec-*/*.cabal\\n' > cabal.project"
102− - cat cabal.project
133+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
134+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
135+ - PKGDIR_attoparsec="$(find . -maxdepth 1 -type d -regex '.*/attoparsec-[0-9.]*')"
136+ # Generate cabal.project
137+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
138+ - touch cabal.project
139+ - |
140+ echo "packages: ${PKGDIR_attoparsec}" >> cabal.project
141+ - |
142+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(attoparsec)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
143+ - cat cabal.project || true
144+ - cat cabal.project.local || true
145+ # Building...
103146 # this builds all libraries and executables (without tests/benchmarks)
104− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
105−
106− # Build with installed constraints for packages in global-db
107− - 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
108−
147+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
148+ # Building with tests and benchmarks...
109149 # build & run tests, build benchmarks
110− - cabal new-build -w ${HC} ${TEST} ${BENCH} all
111− - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
112−
113− # cabal check
114− - (cd attoparsec-* && cabal check)
115−
116− # haddock
117− - rm -rf ./dist-newstyle
118− - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
150+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
151+ # Testing...
152+ - if [ $HCNUMVER -ge 70400 ] && [ $HCNUMVER -lt 80802 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
153+ # cabal check...
154+ - (cd ${PKGDIR_attoparsec} && ${CABAL} -vnormal check)
155+ # haddock...
156+ - ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
157+ # Building without installed constraints for packages in global-db...
158+ - rm -f cabal.project.local
159+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
119160
120−# REGENDATA ["attoparsec.cabal"]
161+# REGENDATA ["--tests-jobs=>=7.4","--no-benchmarks","attoparsec.cabal"]
121162# EOF
attoparsec.cabal+1−1
@@ -6,7 +6,7 @@ category: Text, Parsing
66author: Bryan O'Sullivan <bos@serpentine.com>
77maintainer: Bryan O'Sullivan <bos@serpentine.com>, Ben Gamari <ben@smart-cactus.org>
88stability: experimental
9−tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC ==7.6.3, GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.2
9+tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, 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.5, GHC==8.8.1
1010synopsis: Fast combinator parsing for bytestrings and text
1111cabal-version: >= 1.8
1212homepage: https://github.com/bos/attoparsec