X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/76ae11e09dec419fb20f7c1bb4778a612a2d5bce..cd4eb15c40cdcac3d3269ed4f64eb870ec370823:/buildtools/jenkins/build.sh?ds=sidebyside diff --git a/buildtools/jenkins/build.sh b/buildtools/jenkins/build.sh index 7dbdcaea0f..3af2e9499b 100755 --- a/buildtools/jenkins/build.sh +++ b/buildtools/jenkins/build.sh @@ -2,10 +2,24 @@ set -e -build_mode="$1" +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} @@ -24,7 +38,7 @@ onoff() { fi } -ulimit -c 0 +ulimit -c 0 || true if [ -d $WORKSPACE/build ] then @@ -33,11 +47,6 @@ fi mkdir $WORKSPACE/build cd $WORKSPACE/build -cmake -Denable_documentation=OFF $WORKSPACE -make dist -tar xzf `cat VERSION`.tar.gz -cd `cat VERSION` - case "$build_mode" in "Debug") ;; @@ -53,7 +62,13 @@ case "$build_mode" in ;; esac -cmake -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \ +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_smpi_MPICH3_testsuite=$(onoff test "$build_mode" != "DynamicAnalysis") \ @@ -63,7 +78,7 @@ cmake -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \ -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 +make -j$NUMBER_OF_PROCESSORS cd $WORKSPACE/build cd `cat VERSION`