git.iko.soy/typeable/swagger2
on master help sign in
Add install and script sections to Travis CI config
commitb55de756061df96a2811f16437c6c87e5db99801 authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateSun 8 Nov 2015, 22:56 (11 years ago) parent8fa8e94
1 file changed+21
.travis.yml+21
.travis.yml+21
@@ -19,3 +19,24 @@ matrix:
1919
2020before_install:
2121 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
22+
23+install:
24+ - cabal --version
25+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
26+ - travis_retry cabal update
27+ - cabal install --only-dependencies --enable-tests --enable-benchmarks
28+
29+# 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.
30+script:
31+ - if [ -f configure.ac ]; then autoreconf -i; fi
32+ - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
33+ - cabal build # this builds all libraries and executables (including tests/benchmarks)
34+ - cabal test
35+ - cabal check
36+ - cabal sdist # tests that a source-distribution can be generated
37+
38+# Check that the resulting source distribution can be built & installed.
39+# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
40+# `cabal install --force-reinstalls dist/*-*.tar.gz`
41+ - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
42+ (cd dist && cabal install --force-reinstalls "$SRC_TGZ")