Adds travis scripts for creating and testing source dists.

master
Abhinav Sarkar 2016-10-10 02:09:15 +05:30
parent fd8a5ce540
commit cbf1a9869c
No known key found for this signature in database
GPG Key ID: 7C9166A6F5465AD5
1 changed files with 20 additions and 1 deletions

View File

@ -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: