From c5c86c4ec189c248173256618960fe1e57dfdec1 Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Wed, 3 Aug 2016 18:57:35 +0300 Subject: [PATCH] Test sdist If ChangeLog is present --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6c53d0f..ae2d848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,16 @@ script: - cabal check - stack --no-terminal build --test --no-run-tests - stack --no-terminal test ghc-mod:spec + - | + if [ -r "$TRAVIS_BUILD_DIR/ChangeLog" ]; then + sdistdir="$TRAVIS_BUILD_DIR/../sdist-test" + mkdir -p "$sdistdir" + tar zvxf $(stack sdist 2>&1 | tail -n1 | sed 's/.* //') --strip-components=1 -C "$sdistdir" + cp "ghc-$GHCVER.yaml" stack.yaml "$sdistdir" + cd "$sdistdir" + stack --no-terminal build --test --no-run-tests + stack --no-terminal test ghc-mod:spec + fi matrix: matrix: