[commit: ghc] wip/jenkins: Refactoring (41bb855)

git at git.haskell.org git at git.haskell.org
Thu May 18 00:33:46 UTC 2017


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

On branch  : wip/jenkins
Link       : http://ghc.haskell.org/trac/ghc/changeset/41bb8551893d5628a27da01c4f1a11e0c69ec791/ghc

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

commit 41bb8551893d5628a27da01c4f1a11e0c69ec791
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed May 17 20:20:55 2017 -0400

    Refactoring


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

41bb8551893d5628a27da01c4f1a11e0c69ec791
 Jenkinsfile | 50 +++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 41 insertions(+), 9 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b661917..ae098de 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,20 +1,52 @@
+def buildGhc() {
+  steps {
+    sh 'git submodule update --init --recursive'
+    def speed = 'NORMAL'
+    if (params.nightly) {
+      speed = 'SLOW'
+    }
+    writeFile 'mk/build.mk'
+              '''
+              Validating=YES
+              ValidateSpeed=${speed}
+              ValidateHpc=NO
+              BUILD_DPH=NO
+              '''
+    sh '''
+        ./boot
+        ./configure --enable-tarballs-autodownload
+        make THREADS=${params.threads} test
+        '''
+  }
+}
+
 pipeline {
   agent any
   parameters {
-    booleanParam(name: 'build_docs', defaultValue: false, description: 'build and upload documentation'),
-    string(name: 'THREADS', defaultValue: '2', description: 'available parallelism')
+    booleanParam(name: 'build_docs', defaultValue: false, description: 'build and upload documentation')
+    string(name: 'threads', defaultValue: '2', description: 'available parallelism')
+    booleanParam(name: 'nightly', defaultValue: false, description: 'are we building a nightly?')
   }
 
   stages {
     stage('Build') {
       steps {
-        sh 'git submodule update --init --recursive'
-        sh '''
-           ./boot
-           ./configure --enable-tarballs-autodownload
-           make -j$THREADS
-           make THREADS=$THREADS test
-           '''
+        buildGhc()
+      }
+    }
+
+    stage('Normal testsuite run') {
+      when { environment name: 'nightly', value: false }
+      steps {
+        sh 'make THREADS=${params.threads} test'
+      }
+    }
+
+    stage('Slow testsuite run') {
+      when { environment name: 'nightly', value: true }
+      steps {
+        sh 'cabal install --with-compiler=`pwd`/inplace/bin/ghc-stage2 --package-db=`pwd`/inplace/lib/package.conf.d mtl parallel parsec primitive QuickCheck random regex-compat syb stm utf8-string vector'
+        sh 'make THREADS=${params.threads} slowtest'
       }
     }
   }



More information about the ghc-commits mailing list