diff --git a/.travis.yml b/.travis.yml index c36b816..0247e6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,26 @@ before_install: # This line does all of the work: installs GHC if necessary, build the library, # executables, and test suites, and runs the test suites. --no-terminal works # around some quirks in Travis's terminal implementation. -script: stack $ARGS --no-terminal --install-ghc install --test --fast +script: +- stack $ARGS --no-terminal --install-ghc install --test --fast +- cat << EOF > test_sdist.sh + export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}'); + cd $(stack path | grep dist-dir | awk '{print $2}'); + if [ -f "$SRC_TGZ" ]; then + cabal install "$SRC_TGZ"; + else + echo "expected '$SRC_TGZ' not found"; + exit 1; + fi + EOF + +- stack sdist ringo-core +- cd ringo-core; +- sh ../test_sdist.sh +- cd $(stack path | grep project-root | awk '{print $2}') +- stack sdist ringo +- cd ringo +- sh ../test_sdist.sh # Caching so the next build will be fast too. cache: