1# This Travis job script has been generated by a script via
3# make_travis_yml_2.hs 'http-api-data.cabal'
5# For more information, see https://github.com/hvr/multi-ghc-travis
11 submodules: false # whether to recursively clone submodules
15 - $HOME/.cabal/packages
19 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
20 # remove files that are regenerated by 'cabal update'
21 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
22 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
23 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
24 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
25 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
29 - compiler: "ghc-7.8.4"
30 # env: TEST=--disable-tests BENCH=--disable-benchmarks
31 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
32 - compiler: "ghc-7.10.3"
33 # env: TEST=--disable-tests BENCH=--disable-benchmarks
34 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
35 - compiler: "ghc-8.0.2"
36 # env: TEST=--disable-tests BENCH=--disable-benchmarks
37 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
38 - compiler: "ghc-8.2.1"
39 env: CABALFLAGS="--allow-newer"
40 # env: TEST=--disable-tests BENCH=--disable-benchmarks
41 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
42 - compiler: "ghc-head"
43 env: CABALFLAGS="--allow-newer"
44 # env: TEST=--disable-tests BENCH=--disable-benchmarks
45 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-head], sources: [hvr-ghc]}}
48 - compiler: "ghc-8.2.1" # needs time-1.8.0.2
49 - compiler: "ghc-head"
54 - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
55 - PKGNAME='http-api-data'
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 - travis_retry cabal update -v
63 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
64 # Soon we'll have build-tool-depends: in cabal-head
65 - cabal get hspec-discover-2.3.2
66 - cd hspec-discover-2.3.2
67 - cabal new-build hspec-discover:exe:hspec-discover
68 - mkdir -p ~/.local/bin
69 - shopt -s globstar; cp dist-newstyle/**/hspec-discover/hspec-discover ~/.local/bin
72 - rm -fv cabal.project.local
73 - "echo 'packages: .' > cabal.project"
74 - rm -f cabal.project.freeze
75 - cabal new-build ${CABALFLAGS} -w ${HC} ${TEST} ${BENCH} --dep -j2
76 - cabal new-build ${CABALFLAGS} -w ${HC} --disable-tests --disable-benchmarks --dep -j2
78# Here starts the actual work to be performed for the package under test;
79# any command which exits with a non-zero exit code causes the build to fail.
81 - if [ -f configure.ac ]; then autoreconf -i; fi
83 - cabal sdist # test that a source-distribution can be generated
85 - SRCTAR=(${PKGNAME}-*.tar.gz)
86 - SRC_BASENAME="${SRCTAR/%.tar.gz}"
87 - tar -xvf "./$SRC_BASENAME.tar.gz"
89## from here on, CWD is inside the extracted source-tarball
90 - rm -fv cabal.project.local
91 - "echo 'packages: .' > cabal.project"
92 # this builds all libraries and executables (without tests/benchmarks)
93 - rm -f cabal.project.freeze
94 - cabal new-build ${CABALFLAGS} -w ${HC} --disable-tests --disable-benchmarks
95 - cabal new-build ${CABALFLAGS} -w ${HC} --disable-tests --disable-benchmarks --flag http-api-data:use-text-show
96 # this builds all libraries and executables (including tests/benchmarks)
97 # - rm -rf ./dist-newstyle
98 - cabal new-build ${CABALFLAGS} -w ${HC} ${TEST} ${BENCH}
100 # there's no 'cabal new-test' yet, so let's emulate for now
101 - TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )
102 - if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi
104 RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
105 if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
106 else echo "= $T FAILED ="; RC=false; fi; done; $RC
108 - cabal new-build ${CABALFLAGS} -w ${HC} ${TEST} ${BENCH} --flag http-api-data:use-text-show
110 RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
111 if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
112 else echo "= $T FAILED ="; RC=false; fi; done; $RC
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list