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