1 | def call(JM_CHECKOUT_PATH, JM_BRANCH, INSTALL_PATH, TARGET, bitness=["32", "64"], BLAS_HOME_BASE=null, LAPACK_HOME_BASE=null, SUPERLU_HOME_BASE=null, SUNDIALS_HOME_BASE=null,USER_CONFIG=null,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 | for (bit in bitness) { |
---|
22 | stage ("assimulo_${TARGET} ${bit} bit") { |
---|
23 | if(USER_CONFIG == null) { |
---|
24 | USER_CONFIG="\${JM_HOME}/external/build_externals/configurations/Assimulo/windows/win${bit}" |
---|
25 | } |
---|
26 | runMSYSWithEnv("""\ |
---|
27 | export JM_HOME="\$(pwd)/JModelica/" |
---|
28 | JENKINS_BUILD_DIR="\$(pwd)/build" |
---|
29 | cd \${JM_HOME}/external/build_externals/build/assimulo |
---|
30 | |
---|
31 | make clean BUILD_DIR=\${JENKINS_BUILD_DIR}/assimulo* BITNESS=${bit} |
---|
32 | make ${TARGET} USER_CONFIG=${USER_CONFIG} JM_HOME=\${JM_HOME} BUILD_DIR=\${JENKINS_BUILD_DIR} BLAS_HOME=${BLAS_HOME_BASE}${bit} SUNDIALS_HOME=${SUNDIALS_HOME_BASE}${bit} LAPACK_HOME=${LAPACK_HOME_BASE}${bit} SUPERLU_HOME=${SUPERLU_HOME_BASE}${bit} INSTALL_DIR_FOLDER=${INSTALL_PATH_UNIX}/assimulo/${TARGET}/Python_${bit} |
---|
33 | """); |
---|
34 | if ("${TARGET}" == "folder") { |
---|
35 | runMSYSWithEnv("""\ |
---|
36 | export JM_HOME="\$(pwd)/JModelica/" |
---|
37 | nosetests ${INSTALL_PATH_UNIX}/assimulo/${TARGET}/Python_${bit}/folder/assimulo/tests/*.py |
---|
38 | """, "", false, bit); |
---|
39 | } |
---|
40 | if (stash || archive) { |
---|
41 | dir("${INSTALL_PATH}/assimulo/${TARGET}") { |
---|
42 | if (stash) { |
---|
43 | stash includes: "Python_${bit}/**", name: "Python_${bit}_assimulo_${TARGET}" |
---|
44 | } |
---|
45 | if (archive) { |
---|
46 | archiveArtifacts artifacts: "Python_${bit}/**", fingerprint: false |
---|
47 | } |
---|
48 | } |
---|
49 | } |
---|
50 | } |
---|
51 | } |
---|
52 | } |
---|