forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of changes: - When possible, we use the container infrastructure (sudo: false) rather than Google Compute Engine infrastructure (sudo: required). Unfortunately, we can't use GCE for the Linux builds, where reduced RAM available hoses are GHC build. - Switched from using ./Setup and old-style cabal to new-build. There are numerous great benefits but the best is that .cabal/store can be cached on Travis, leading to huge speedups on the build. Downside is we need to string-and-ceiling-wax support for test/haddock/etc. - I stopped bootstrapping on every build we do; instead there is a separate bootstrap build we do to make sure that that is working. This also speeds up the basic builds since we are not building Cabal/cabal-install multiple times. - There are some hacks. The big one is setting CABAL_BUILDDIR explicitly; this smooths over quite a few infelicities in the current new-build implementation. Signed-off-by: Edward Z. Yang <[email protected]>
- Loading branch information
Showing
9 changed files
with
229 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- Force error messages to be better | ||
-- Parallel new-build error messages are non-existent. | ||
-- Turn off parallelization to get good errors. | ||
jobs: 1 | ||
|
||
-- The -fno-warn-orphans is a hack to make Cabal-1.24 | ||
-- build properly (unfortunately the flags here get applied | ||
-- to the dependencies too!) | ||
package Cabal | ||
ghc-options: -Werror -fno-warn-orphans | ||
|
||
package cabal-install | ||
ghc-options: -Werror |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
. ./travis-common.sh | ||
|
||
# --------------------------------------------------------------------- | ||
# Bootstrap cabal, to verify bootstrap.sh script works. | ||
# --------------------------------------------------------------------- | ||
|
||
bootstrap_jobs="-j" | ||
|
||
(cd cabal-install && timed env EXTRA_CONFIGURE_OPTS="" ./bootstrap.sh $bootstrap_jobs --no-doc) | ||
timed $HOME/.cabal/bin/cabal --version | ||
PATH=$HOME/.cabal/bin:$PATH | ||
|
||
# --------------------------------------------------------------------- | ||
# Verify that installation from tarball works. | ||
# --------------------------------------------------------------------- | ||
|
||
# The following scriptlet checks that the resulting source distribution can be | ||
# built & installed. | ||
install_from_tarball() { | ||
SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; | ||
export SRC_TGZ | ||
if [ -f "dist/$SRC_TGZ" ]; then | ||
cabal install --force-reinstalls $jobs "dist/$SRC_TGZ" -v2; | ||
else | ||
echo "expected 'dist/$SRC_TGZ' not found"; | ||
exit 1; | ||
fi | ||
} | ||
|
||
timed cabal update | ||
|
||
echo Cabal | ||
(cd Cabal && timed cabal sdist) | ||
(cd Cabal && timed install_from_tarball) | ||
|
||
echo cabal-install | ||
(cd cabal-install && timed cabal sdist) | ||
(cd cabal-install && timed install_from_tarball) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set -e | ||
|
||
CABAL_VERSION="1.25.0.0" | ||
|
||
# --------------------------------------------------------------------- | ||
# Timing / diagnostic output | ||
# --------------------------------------------------------------------- | ||
|
||
timed() { | ||
echo "\$ $*" | ||
start_time=$(date +%s) | ||
$* | ||
end_time=$(date +%s) | ||
duration=$((end_time - start_time)) | ||
echo "$* took $duration seconds." | ||
echo "----" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
. ./travis-common.sh | ||
|
||
# --------------------------------------------------------------------- | ||
# Check that auto-generated files/fields are up to date. | ||
# --------------------------------------------------------------------- | ||
|
||
# Regenerate the CONTRIBUTORS file. | ||
# Currently doesn't work because Travis uses --depth=50 when cloning. | ||
#./Cabal/misc/gen-authors.sh > AUTHORS | ||
|
||
# Regenerate the 'extra-source-files' field in Cabal.cabal. | ||
(cd Cabal && timed ./misc/gen-extra-source-files.sh Cabal.cabal) | ||
|
||
# Regenerate the 'extra-source-files' field in cabal-install.cabal. | ||
(cd cabal-install && ../Cabal/misc/gen-extra-source-files.sh cabal-install.cabal) | ||
|
||
# Fail if the diff is not empty. | ||
timed ./Cabal/misc/travis-diff-files.sh |
Oops, something went wrong.