1# This Travis job script has been generated by a script via
3# make_travis_yml_2.hs 'cabal2nix.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-8.2.1"
30 # env: TEST=--disable-tests BENCH=--disable-benchmarks
31 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
35 - HCPKG=${HC/ghc/ghc-pkg}
37 - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
42 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
43 - BENCH=${BENCH---enable-benchmarks}
44 - TEST=${TEST---enable-tests}
45 - HADDOCK=${HADDOCK-true}
46 - INSTALLED=${INSTALLED-true}
47 - travis_retry cabal update -v
48 - sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
49 - rm -fv cabal.project.local
50 - "echo 'packages: .' > cabal.project"
51 - rm -f cabal.project.freeze
52 - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
53 - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
55# Here starts the actual work to be performed for the package under test;
56# any command which exits with a non-zero exit code causes the build to fail.
58 - if [ -f configure.ac ]; then autoreconf -i; fi
59 - rm -rf .ghc.environment.* dist/
60 - cabal sdist # test that a source-distribution can be generated
62 - SRCTAR=(${PKGNAME}-*.tar.gz)
63 - SRC_BASENAME="${SRCTAR/%.tar.gz}"
64 - tar -xvf "./$SRC_BASENAME.tar.gz"
66## from here on, CWD is inside the extracted source-tarball
67 - rm -fv cabal.project.local
68 - "echo 'packages: .' > cabal.project"
69 # this builds all libraries and executables (without tests/benchmarks)
70 - rm -f cabal.project.freeze
71 - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
72 # this builds all libraries and executables (including tests/benchmarks)
73 # - rm -rf ./dist-newstyle
75 # Build with installed constraints for packages in global-db
77 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;
78 else echo "Not building with installed constraints"; fi
80 # build & run tests, build benchmarks
81 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
82 - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
85 - rm -rf ./dist-newstyle
86 - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
88# REGENDATA ["cabal2nix.cabal"]
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