Commit 09de127c authored by ttuegel's avatar ttuegel
Browse files

Stop repeated rebuilds on Travis

Changing the build config format causes cabal-install to repeatedly
rebuild the Cabal library during the configure->build->test cycle.
parent 12ef6c65
......@@ -23,10 +23,15 @@ install:
- /opt/ghc/$GHCVER/bin/ghc-pkg recache --user
# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
# Using ./dist/setup/setup here instead of cabal-install to avoid breakage
# when the build config format changed
script:
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- cabal build # this builds all libraries and executables (including tests/benchmarks)
- cabal test
- mkdir -p ./dist/setup
- cp Setup.hs ./dist/setup/setup.hs
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -threaded # the command cabal-install would use to build setup
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup build # this builds all libraries and executables (including tests/benchmarks)
- ./dist/setup/setup test --show-details=streaming
- cabal check
- cabal sdist # tests that a source-distribution can be generated
......@@ -34,7 +39,7 @@ script:
- function install_from_tarball {
export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
if [ -f "dist/$SRC_TGZ" ]; then
cabal install "dist/$SRC_TGZ";
cabal install "dist/$SRC_TGZ" -v2;
else
echo "expected 'dist/$SRC_TGZ' not found";
exit 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment