source: branches/dev-5819/external/build_externals/Jenkins/ci/vars/buildAssimulo.groovy @ 13972

Last change on this file since 13972 was 13972, checked in by randersson, 5 weeks ago

#5819 Removed arguments not needed since they are specified in the config

File size: 2.2 KB
Line 
1def call(JM_CHECKOUT_PATH, JM_BRANCH, INSTALL_PATH, TARGET, bitness=["32", "64"], build_with_msvs=null, BLAS_HOME_BASE=null, LAPACK_HOME_BASE=null, SUPERLU_HOME_BASE=null, SUNDIALS_HOME_BASE=null,USER_CONFIG=null, extra_bat="", stash=false, archive=true) {
2    if (JM_CHECKOUT_PATH != null) {
3        checkoutJM(${JM_BRANCH})
4    }
5    INSTALL_PATH_UNIX=unixpath("${INSTALL_PATH}")
6    if (BLAS_HOME_BASE == null) {
7        BLAS_HOME_BASE="${INSTALL_PATH_UNIX}/blas_install"
8    }
9
10    if (LAPACK_HOME_BASE == null) {
11        LAPACK_HOME_BASE="${INSTALL_PATH_UNIX}/lapack_install"
12    }
13
14    if (SUPERLU_HOME_BASE == null) {
15        SUPERLU_HOME_BASE="${INSTALL_PATH_UNIX}/superlu_install"
16    }
17
18    if (SUNDIALS_HOME_BASE == null) {
19        SUNDIALS_HOME_BASE="${INSTALL_PATH_UNIX}/sundials_install"
20    }
21    if (build_with_msvs) {
22        msvs_suffix="msvs"
23    } else {
24        msvs_suffix=""
25    }
26    for (bit in bitness) {
27        stage ("assimulo_${TARGET} ${bit}${msvs_suffix} bit") {
28            runMSYSWithEnv("""\
29            export JM_HOME="\$(pwd)/JModelica/"
30            JENKINS_BUILD_DIR="\$(pwd)/build"
31            cd \${JM_HOME}/external/build_externals/build/assimulo
32           
33            make clean BUILD_DIR=\${JENKINS_BUILD_DIR}/assimulo
34            make ${TARGET} USER_CONFIG=${USER_CONFIG} JM_HOME=\${JM_HOME} BUILD_DIR=\${JENKINS_BUILD_DIR} INSTALL_DIR_FOLDER=${INSTALL_PATH_UNIX}/assimulo/${TARGET}/Python_${bit}
35            """, extra_bat);
36            if ("${TARGET}" == "folder") {
37                runMSYSWithEnv("""\
38                export JM_HOME="\$(pwd)/JModelica/"
39                nosetests ${INSTALL_PATH_UNIX}/assimulo/${TARGET}/Python_${bit}/folder/assimulo/tests/*.py
40                """, "", false, bit);
41            }
42            if (stash || archive) {
43                dir("${INSTALL_PATH}/assimulo/${TARGET}") {
44                    if (stash) {
45                        stash includes: "Python_${bit}/**", name: "Python_${bit}_assimulo_${TARGET}"
46                    }
47                    if (archive) {
48                        archiveArtifacts artifacts: "Python_${bit}/**", fingerprint: false
49                    }
50                }
51            }
52        }
53    }
54}
Note: See TracBrowser for help on using the repository browser.