[commit: ghc] wip/jenkins: Parametrize on make command (d89dbdf)

git at git.haskell.org git at git.haskell.org
Thu Jul 27 20:48:30 UTC 2017


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

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

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

commit d89dbdf6ecf130c1db4305480a3bc1096d450736
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon May 29 15:44:39 2017 -0400

    Parametrize on make command


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

d89dbdf6ecf130c1db4305480a3bc1096d450736
 Jenkinsfile | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 60d0b9d..8ec33cd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -25,7 +25,7 @@ parallel (
     node(label: 'linux && aarch64') {buildGhc(runNoFib: false)}
   },
   "freebsd"            : {
-    node(label: 'freebsd && amd64') {buildGhc(runNoFib: false)}
+    node(label: 'freebsd && amd64') {buildGhc(runNoFib: false, makeCmd: 'gmake')}
   },
   // Requires cygpath plugin?
   // Make
@@ -54,6 +54,7 @@ def buildGhc(params) {
   boolean runNoFib = params?.runNofib ?: false
   String crossTarget = params?.crossTarget
   boolean unreg = params?.unreg ?: false
+  String makeCmd = params?.makeCmd ?: 'make'
 
   stage('Checkout') {
     checkout scm
@@ -97,11 +98,13 @@ def buildGhc(params) {
   }
 
   stage('Build') {
-    sh "make -j${env.THREADS}"
+    sh "${makeCmd} -j${env.THREADS}"
   }
 }
 
-def testGhc() {
+def testGhc(params) {
+  String makeCmd = params?.makeCmd ?: 'make'
+
   stage('Install testsuite dependencies') {
     if (params.nightly && !crossTarget) {
       def pkgs = ['mtl', 'parallel', 'parsec', 'primitive', 'QuickCheck',
@@ -117,7 +120,7 @@ def testGhc() {
       if (params.nightly) {
         target = 'slowtest'
       }
-      sh "make THREADS=${env.THREADS} ${target}"
+      sh "${makeCmd} THREADS=${env.THREADS} ${target}"
     }
   }
 
@@ -126,9 +129,9 @@ def testGhc() {
       installPkgs(['regex-compat'])
       sh """
          cd nofib
-         make clean
-         make boot
-         make >../nofib.log 2>&1
+         ${makeCmd} clean
+         ${makeCmd} boot
+         ${makeCmd} >../nofib.log 2>&1
          """
       archive 'nofib.log'
     }
@@ -136,8 +139,8 @@ def testGhc() {
 
   stage('Prepare bindist') {
     if (params.buildBindist) {
-      sh "make binary-dist"
       archive 'ghc-*.tar.xz'
+      sh "${makeCmd} binary-dist"
     }
   }
 }



More information about the ghc-commits mailing list