X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/53b158e6299ce0e51cf457188012d8685e9f3bfc..e09f8309dbd178c3fbde4805e871ea512b70c66c:/buildtools/jenkins/build.sh diff --git a/buildtools/jenkins/build.sh b/buildtools/jenkins/build.sh index 125d3ca109..8e9720a464 100755 --- a/buildtools/jenkins/build.sh +++ b/buildtools/jenkins/build.sh @@ -2,24 +2,6 @@ set -e -echo "Running $0 with arguments:" >&2 -for arg in "$@"; do - echo "- $arg" -done - -build_mode="$1" -echo "Build mode $build_mode on $(uname -np)" >&2 - -if test "$(uname -o)" = "Msys"; then - if [ -z "$NUMBER_OF_PROCESSORS" ]; then - NUMBER_OF_PROCESSORS=1 - fi - GENERATOR="MSYS Makefiles" -else - NUMBER_OF_PROCESSORS="$(nproc)" || NUMBER_OF_PROCESSORS=1 - GENERATOR="Unix Makefiles" -fi - # usage: die status message... die () { local status=${1:-1} @@ -38,20 +20,8 @@ onoff() { fi } -ulimit -c 0 || true - -if [ -d $WORKSPACE/build ] -then - rm -rf $WORKSPACE/build -fi -mkdir $WORKSPACE/build -cd $WORKSPACE/build - -cmake -G"$GENERATOR" -Denable_documentation=OFF $WORKSPACE -make dist -j$NUMBER_OF_PROCESSORS -tar xzf `cat VERSION`.tar.gz -cd `cat VERSION` - +build_mode="$1" +echo "Build mode $build_mode on $(uname -np)" >&2 case "$build_mode" in "Debug") ;; @@ -63,14 +33,38 @@ case "$build_mode" in ;; *) - die 1 "Unknown build_mode $build_mode" + die 1 "Unknown build_mode $build_mode" ;; esac +if test "$(uname -o)" = "Msys"; then + if [ -z "$NUMBER_OF_PROCESSORS" ]; then + NUMBER_OF_PROCESSORS=1 + fi + GENERATOR="MSYS Makefiles" +else + NUMBER_OF_PROCESSORS="$(nproc)" || NUMBER_OF_PROCESSORS=1 + GENERATOR="Unix Makefiles" +fi + +ulimit -c 0 || true + +if [ -d $WORKSPACE/build ] +then + rm -rf $WORKSPACE/build +fi +mkdir $WORKSPACE/build +cd $WORKSPACE/build + +cmake -G"$GENERATOR" -Denable_documentation=OFF $WORKSPACE +make dist -j$NUMBER_OF_PROCESSORS +tar xzf `cat VERSION`.tar.gz +cd `cat VERSION` + cmake -G"$GENERATOR"\ -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \ -Denable_model-checking=$(onoff test "$build_mode" = "ModelChecker") \ - -Denable_compile_optimization=$(onoff test "$build_mode" = "Debug") \ + -Denable_compile_optimizations=$(onoff test "$build_mode" = "Debug") \ -Denable_smpi_MPICH3_testsuite=$(onoff test "$build_mode" != "DynamicAnalysis") \ -Denable_lua=$(onoff test "$build_mode" != "DynamicAnalysis") \ -Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \ @@ -78,7 +72,7 @@ cmake -G"$GENERATOR"\ -Denable_compile_warnings=ON -Denable_smpi=ON -Denable_lib_static=OFF \ -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF \ -Denable_tracing=ON -Denable_java=ON -make -j$NUMBER_OF_PROCESSORS +make -j$NUMBER_OF_PROCESSORS VERBOSE=1 cd $WORKSPACE/build cd `cat VERSION`