6 # usage: die status message...
10 [ $# -gt 0 ] || set -- "Error - Halting"
15 rm -rf $WORKSPACE/build
17 mkdir $WORKSPACE/build
20 export PATH=./lib/:../../lib:$PATH
22 if test "$(uname -o)" = "Msys"
24 #$NUMBER_OF_PROCESSORS should be already set on win
25 if [ -z "$NUMBER_OF_PROCESSORS" ]; then
26 NUMBER_OF_PROCESSORS=1
29 cmake -G "MSYS Makefiles" $WORKSPACE || die 1 "Failed to do the first cmake - Halting"
31 make dist || die 2 "Failed to build dist - Halting"
33 cmake -G "MSYS Makefiles" -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=OFF . \
34 || die 5 "Failed to perform the Cmake for $build_mode - Halting"
36 make -j$NUMBER_OF_PROCESSORS || die 5 "Build failure - Halting"
38 make nsis || die 6 "Failure while generating the Windows executable - Halting"
42 cpuinfo_file="/proc/cpuinfo"
43 NUMBER_OF_PROCESSORS=$(lscpu -p 2>/dev/null | grep -c '^[^#]') || \
44 NUMBER_OF_PROCESSORS=$(grep -c "^processor[[:space:]]*:" ${cpuinfo_file} 2>/dev/null)
45 [ "0$NUMBER_OF_PROCESSORS" -gt 0 ] || NUMBER_OF_PROCESSORS=1
47 cmake $WORKSPACE || die 1 "Failed to do the first cmake - Halting"
50 make dist || die 2 "Failed to build dist - Halting"
52 tar xzf `cat VERSION`.tar.gz || die 3 "Failed to extract the generated tgz - Halting"
54 cd `cat VERSION` || die 4 "Path `cat VERSION` cannot be found - Halting"
56 if [ "$build_mode" = "Debug" ]
58 cmake -Denable_coverage=OFF -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
61 if [ "$build_mode" = "ModelChecker" ]
63 cmake -Denable_coverage=OFF -Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
66 if [ "$build_mode" = "DynamicAnalysis" ]
68 cmake -Denable_lua=OFF -Denable_java=ON -Denable_tracing=ON -Denable_smpi=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck=ON .
71 [ $? -eq 0 ] || die 5 "Failed to perform the Cmake for $build_mode - Halting"
73 make -j$NUMBER_OF_PROCESSORS || die 6 "Build failure - Halting"
76 echo "running tests with $NUMBER_OF_PROCESSORS processors"
78 ctest -T test --no-compress-output --timeout 100 -j$NUMBER_OF_PROCESSORS || true
79 if [ -f Testing/TAG ] ; then
80 xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl -o "$WORKSPACE/CTestResults.xml" Testing/`head -n 1 < Testing/TAG`/Test.xml
83 ctest -D ContinuousStart
84 ctest -D ContinuousConfigure
85 ctest -D ContinuousBuild
86 ctest -D ContinuousTest
87 ctest -D ContinuousSubmit