[commit: ghc] wip/jenkins: Parametrize on make command (f7756fd)
git at git.haskell.org
git at git.haskell.org
Sun Jun 4 05:08:09 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/jenkins
Link : http://ghc.haskell.org/trac/ghc/changeset/f7756fd08a08e4a39d1e110ded48b44458ecb99f/ghc
>---------------------------------------------------------------
commit f7756fd08a08e4a39d1e110ded48b44458ecb99f
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon May 29 15:44:39 2017 -0400
Parametrize on make command
>---------------------------------------------------------------
f7756fd08a08e4a39d1e110ded48b44458ecb99f
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