5 # usage: die status message...
9 [ $# -gt 0 ] || set -- "Error - Halting"
14 # Get an ON/OFF string from a command:
16 if "$@" > /dev/null ; then
24 echo "Build mode $build_mode on $(uname -np)" >&2
36 die 1 "Unknown build_mode $build_mode"
40 if test "$(uname -o)" = "Msys"; then
41 if [ -z "$NUMBER_OF_PROCESSORS" ]; then
42 NUMBER_OF_PROCESSORS=1
44 GENERATOR="MSYS Makefiles"
46 NUMBER_OF_PROCESSORS="$(nproc)" || NUMBER_OF_PROCESSORS=1
47 GENERATOR="Unix Makefiles"
52 if test "$(uname -o)" != "Msys"; then
54 echo "XX Get out of the tree"
56 if [ -d $WORKSPACE/build ]
58 rm -rf $WORKSPACE/build
60 mkdir $WORKSPACE/build
64 echo "XX Build the archive out of the tree"
68 cmake -G"$GENERATOR" -Denable_documentation=OFF $WORKSPACE
69 make dist -j$NUMBER_OF_PROCESSORS
72 echo "XX Open the resulting archive"
74 tar xzf `cat VERSION`.tar.gz
79 echo "XX Configure and build SimGrid"
83 -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
84 -Denable_model-checking=$(onoff test "$build_mode" = "ModelChecker") \
85 -Denable_smpi_ISP_testsuite=$(onoff test "$build_mode" = "ModelChecker") \
86 -Denable_compile_optimizations=$(onoff test "$build_mode" = "Debug") \
87 -Denable_smpi_MPICH3_testsuite=$(onoff test "$build_mode" != "DynamicAnalysis") \
88 -Denable_lua=$(onoff test "$build_mode" != "DynamicAnalysis") \
89 -Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \
90 -Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \
91 -Denable_compile_warnings=ON -Denable_smpi=ON -Denable_lib_static=OFF \
92 -Denable_latency_bound_tracking=OFF -Denable_jedule=OFF \
93 -Denable_tracing=ON -Denable_java=ON
94 make -j$NUMBER_OF_PROCESSORS VERBOSE=1
96 if test "$(uname -o)" != "Msys"; then
104 echo "XX Run the tests"
108 ctest -T test --output-on-failure --no-compress-output || true
109 if [ -f Testing/TAG ] ; then
110 xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > CTestResults.xml
111 mv CTestResults.xml $WORKSPACE
115 echo "XX Done. Return the results to cmake"
118 if [ "$build_mode" = "DynamicAnalysis" ]
120 ctest -D ContinuousStart
121 ctest -D ContinuousConfigure
122 ctest -D ContinuousBuild
123 ctest -D ContinuousMemCheck
124 ctest -D ContinuousSubmit
127 ctest -D ContinuousStart
128 ctest -D ContinuousConfigure
129 ctest -D ContinuousBuild
130 ctest -D ContinuousTest
131 ctest -D ContinuousSubmit