5 # ---------------------------------------------------------------------
6 # Bootstrap cabal, to verify bootstrap.sh script works.
7 # ---------------------------------------------------------------------
11 (cd cabal-install
&& timed env EXTRA_CONFIGURE_OPTS
="" .
/bootstrap.sh
$bootstrap_jobs --no-doc)
12 timed
$HOME/.cabal
/bin
/cabal
--version
13 PATH
=$HOME/.cabal
/bin
:$PATH
15 # ---------------------------------------------------------------------
16 # Verify that installation from tarball works.
17 # ---------------------------------------------------------------------
19 # The following scriptlet checks that the resulting source distribution can be
21 install_from_tarball
() {
22 SRC_NAME
=$
(cabal info . |
awk '{print $2;exit}') ;
23 SRC_TGZ
="$SRC_NAME.tar.gz"
24 SRC_PATH
="$TRAVIS_BUILD_DIR/dist-newstyle/sdist/$SRC_TGZ"
26 if [ -f "$SRC_PATH" ]; then
27 tar xzf
$SRC_PATH -C /tmp
;
29 cabal build
--force-reinstalls $jobs all
-v2;
31 echo "expected '$TRAVIS_BUILD_DIR/dist-newstyle/sdist/$SRC_TGZ' not found";
38 # NB: The cabal cleans here hack around an sdist bug where
39 # the bootstrapped Cabal/cabal-install may be built
40 # without a Paths_* module available. Under some situations
41 # which I have not been able to reproduce except on Travis,
42 # cabal sdist will incorrectly pick up the left over dist
43 # directory from the bootstrap and then try to package
44 # up the Paths module, but to no avail because it is not
45 # available. I ran out of patience trying to debug this
46 # issue, and it is easy enough to work around: clean first.
49 (cd Cabal
&& timed cabal clean
) ||
exit $?
50 (cd Cabal
&& timed cabal sdist
) ||
exit $?
51 (cd Cabal
&& timed install_from_tarball
) ||
exit $?
54 (cd cabal-install
&& timed cabal clean
) ||
exit $?
55 (cd cabal-install
&& timed cabal sdist
) ||
exit $?
56 # I don't know how to fix this exactly right now.
57 #(cd cabal-install && timed install_from_tarball) || exit $?