[commit: ghc] wip/travis: Add new validate flag: --fastest (dba4217)

git at git.haskell.org git at git.haskell.org
Wed Jul 30 10:46:18 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/travis
Link       : http://ghc.haskell.org/trac/ghc/changeset/dba4217ece6198d9a4728db4bdc5f380af4d219f/ghc

>---------------------------------------------------------------

commit dba4217ece6198d9a4728db4bdc5f380af4d219f
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Jul 29 14:14:17 2014 +0200

    Add new validate flag: --fastest
    
    This tries to further reduce the time and space it takes to build GHC.
    The main use for that would be building on travis, but other users might
    also exist.


>---------------------------------------------------------------

dba4217ece6198d9a4728db4bdc5f380af4d219f
 .travis.yml             |  8 +-------
 mk/validate-settings.mk | 20 +++++++++++++++++---
 validate                | 18 +++++++++++++++---
 3 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 57153b6..22fe266 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,13 +24,7 @@ install:
  - cabal install happy alex
 script:
  - echo 'V = 0' >> mk/validate.mk # otherwise we hit log file limits on travis.
- # do  not build docs
- - echo 'HADDOCK_DOCS       = NO' >> mk/validate.mk
- - echo 'BUILD_DOCBOOK_HTML = NO' >> mk/validate.mk
- - echo 'BUILD_DOCBOOK_PS   = NO' >> mk/validate.mk
- - echo 'BUILD_DOCBOOK_PDF  = NO' >> mk/validate.mk
  # do not build dynamic libraries
  - echo 'DYNAMIC_GHC_PROGRAMS = NO' >> mk/validate.mk
- - echo 'GhcLibWays = v' >> mk/validate.mk
  - if [ "$DEBUG_STAGE" = "YES" ]; then echo 'GhcStage2HcOpts += -DDEBUG' >> mk/validate.mk; fi
- - CPUS=2 SKIP_PERF_TESTS=YES PATH=~/.cabal/bin:$PATH ./validate --fast --no-dph
+ - CPUS=2 PATH=~/.cabal/bin:$PATH ./validate --fastest --no-dph
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk
index cac938d..5366a0e 100644
--- a/mk/validate-settings.mk
+++ b/mk/validate-settings.mk
@@ -5,7 +5,11 @@ WERROR              = -Werror
 SRC_CC_WARNING_OPTS =
 SRC_HC_WARNING_OPTS =
 
+ifneq "$(ValidateSpeed)" "FASTEST"
+HADDOCK_DOCS    = NO
+else
 HADDOCK_DOCS    = YES
+endif
 
 #####################
 # Warnings
@@ -39,12 +43,17 @@ utils/hpc_dist-install_EXTRA_HC_OPTS += -fwarn-tabs
 SRC_HC_OPTS     += -H64m -O0
 
 GhcStage1HcOpts += -O
-GhcStage2HcOpts += -O -dcore-lint
+GhcStage2HcOpts += -O
 # Using -O (rather than -O0) here bringes my validate down from 22mins to 16 mins.
 # Compiling stage2 takes longer, but we gain a faster haddock, faster
 # running of the tests, and faster building of the utils to be installed
 
-GhcLibHcOpts    += -O -dcore-lint
+GhcLibHcOpts    += -O
+
+ifneq "$(ValidateSpeed)" "FASTEST"
+GhcStage2HcOpts += -dcore-lint
+GhcLibHcOpts    += -dcore-lint
+endif
 
 # We define DefaultFastGhcLibWays in this style so that the value is
 # correct even if the user alters DYNAMIC_GHC_PROGRAMS.
@@ -53,7 +62,7 @@ GhcLibHcOpts    += -O -dcore-lint
 DefaultFastGhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v)
 DefaultProfGhcLibWays = $(if $(filter $(GhcProfiled),YES),p,)
 
-ifeq "$(ValidateSpeed)" "FAST"
+ifneq (,$(filter $(ValidateSpeed),FAST FASTEST))
 GhcLibWays     = $(DefaultFastGhcLibWays)
 else
 GhcLibWays     := $(filter v dyn,$(GhcLibWays))
@@ -74,6 +83,11 @@ InstallExtraPackages = YES
 # validating.
 BUILD_DOCBOOK_PS  = NO
 BUILD_DOCBOOK_PDF = NO
+ifneq "$(ValidateSpeed)" "FASTEST"
+BUILD_DOCBOOK_HTML = NO
+else
+BUILD_DOCBOOK_HTML = YES
+endif
 
 ifeq "$(ValidateHpc)" "YES"
 GhcStage2HcOpts += -fhpc -hpcdir $(TOP)/testsuite/hpc_output/
diff --git a/validate b/validate
index cabb86c..29294bd 100755
--- a/validate
+++ b/validate
@@ -20,6 +20,8 @@ Flags:
                     HTML generated here: testsuite/hpc_output/hpc_index.html
   --normal          Default settings
   --fast            Omit dyn way, omit binary distribution
+  --fastest         like --fast, but do not lint, do not run performance tests,
+                    do not build documentation
   --slow            Build stage2 with -DDEBUG.
                     2008-07-01: 14% slower than the default.
   --no-dph:         Skip building libraries/dph and running associated tests.
@@ -57,6 +59,9 @@ do
     --slow)
         speed=SLOW
         ;;
+    --fastest)
+        speed=FASTEST
+        ;;
     --fast)
         speed=FAST
         ;;
@@ -148,9 +153,9 @@ $make -j$threads
 check_packages post-build
 
 # -----------------------------------------------------------------------------
-# Build and test a binary distribution (not --fast)
+# Build and test a binary distribution (not --fast or --fastest)
 
-if [ $speed != "FAST" ]; then
+if [ $speed != "FAST" -a $speed != "FASTEST" ]; then
 
     $make binary-dist-prep
     $make test_bindist TEST_PREP=YES
@@ -184,6 +189,8 @@ then
     rm -f $HPCTIXFILE
 fi
 
+SKIP_PERF_TESTS=NO
+
 case "$speed" in
 SLOW)
         MAKE_TEST_TARGET=fulltest
@@ -197,9 +204,14 @@ FAST)
         MAKE_TEST_TARGET=test
         BINDIST="BINDIST=NO"
         ;;
+FASTEST)
+        MAKE_TEST_TARGET=test
+        BINDIST="BINDIST=NO"
+        SKIP_PERF_TESTS=YES
+        ;;
 esac
 
-$make $MAKE_TEST_TARGET stage=2 $BINDIST THREADS=$threads 2>&1 | tee testlog
+$make $MAKE_TEST_TARGET stage=2 $BINDIST SKIP_PERF_TESTS=$SKIP_PERF_TESTS THREADS=$threads 2>&1 | tee testlog
 
 check_packages post-testsuite
 



More information about the ghc-commits mailing list