7 rm -rf $WORKSPACE/build
12 export PATH=./lib/:../../lib:$PATH
14 if test "$(uname -o)" = "Msys"
16 #$NUMBER_OF_PROCESSORS should be already set on win
17 if [ -z "$NUMBER_OF_PROCESSORS" ]; then
18 NUMBER_OF_PROCESSORS=1
21 cmake -G "MSYS Makefiles" $WORKSPACE
23 if [ $? -ne 0 ] ; then
24 echo "Failed to do the first cmake - Halting"
30 if [ $? -ne 0 ] ; then
31 echo "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 .
37 if [ $? -ne 0 ] ; then
38 echo "Failed to perform the Cmake for $build_mode - Halting"
42 make -j$NUMBER_OF_PROCESSORS
44 if [ $? -ne 0 ] ; then
45 echo "Build failure - Halting"
51 if [ $? -ne 0 ] ; then
52 echo "Failure while generating the Windows executable - Halting"
58 cpuinfo_file="/proc/cpuinfo"
59 NUMBER_OF_PROCESSORS=$(lscpu -p 2>/dev/null | grep -c '^[^#]') || \
60 NUMBER_OF_PROCESSORS=$(grep -c "^processor[[:space:]]*:" ${cpuinfo_file} 2>/dev/null)
61 [ "0$NUMBER_OF_PROCESSORS" -gt 0 ] || NUMBER_OF_PROCESSORS=1
65 if [ $? -ne 0 ] ; then
66 echo "Failed to do the first cmake - Halting"
73 if [ $? -ne 0 ] ; then
74 echo "Failed to build dist - Halting"
78 tar xzf `cat VERSION`.tar.gz
80 if [ $? -ne 0 ] ; then
81 echo "Failed to extract the generated tgz - Halting"
87 if [ $? -ne 0 ] ; then
88 echo "Path `cat VERSION` cannot be found - Halting"
92 if [ "$build_mode" = "Debug" ]
94 cmake -Denable_coverage=ON -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 .
97 if [ "$build_mode" = "ModelChecker" ]
99 cmake -Denable_coverage=ON -Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
102 if [ "$build_mode" = "DynamicAnalysis" ]
104 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 .
107 if [ $? -ne 0 ] ; then
108 echo "Failed to perform the Cmake for $build_mode - Halting"
112 make -j$NUMBER_OF_PROCESSORS
114 if [ $? -ne 0 ] ; then
115 echo "Build failure - Halting"
122 echo "running tests with $NUMBER_OF_PROCESSORS processors"
124 ctest -T test --no-compress-output --timeout 100 -j$NUMBER_OF_PROCESSORS || true
125 if [ -f Testing/TAG ] ; then
126 xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl -o "$WORKSPACE/CTestResults.xml" Testing/`head -n 1 < Testing/TAG`/Test.xml
129 ctest -D ContinuousStart
130 ctest -D ContinuousConfigure
131 ctest -D ContinuousBuild
132 ctest -D ContinuousTest
133 ctest -D ContinuousSubmit