X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8413a52c04652aef948cce105071e12169fab87f..HEAD:/tools/jenkins/build.sh diff --git a/tools/jenkins/build.sh b/tools/jenkins/build.sh index 904e14dcf4..0438427009 100755 --- a/tools/jenkins/build.sh +++ b/tools/jenkins/build.sh @@ -2,6 +2,13 @@ # This script is used by various build projects on Jenkins +case "$JENKINS_HOME" in +*-qualif) + echo "Build skipped on $JENKINS_HOME." + exit 0 + ;; +esac + # See https://ci.inria.fr/simgrid/job/SimGrid/configure # See https://ci.inria.fr/simgrid/job/Simgrid-Windows/configure @@ -10,6 +17,7 @@ export LC_ALL=C echo "XXXX Cleanup previous attempts. Remaining content of /tmp:" rm -f /tmp/cc* +rm -f /tmp/simgrid-mc-* rm -f /tmp/*.so rm -f /tmp/*.so.* ls /tmp @@ -121,6 +129,13 @@ echo "Branch built is $branch_name" NUMBER_OF_PROCESSORS="$(nproc)" || NUMBER_OF_PROCESSORS=1 GENERATOR="Unix Makefiles" +BUILDER=make +VERBOSE_BUILD="VERBOSE=1" +if which ninja 2>/dev/null >/dev/null ; then + GENERATOR=Ninja + BUILDER=ninja + VERBOSE_BUILD="-v" +fi ulimit -c 0 || true @@ -141,11 +156,6 @@ if [ "$os" = "Debian" ] ; then have_NS3="yes" fi fi -MAY_HINT_AT_NS3="" -if [ $NODE_NAME = "ubuntu-lts" ] ; then - MAY_HINT_AT_NS3="-DNS3_HINT=/builds/ns-3-dev/build/" - have_NS3="yes" -fi if [ "$os" = "nixos" ] ; then have_NS3="yes" fi @@ -166,7 +176,7 @@ echo "XX pwd: $(pwd)" echo "XX" cmake -G"$GENERATOR" -Denable_documentation=OFF "$WORKSPACE" -make dist -j $NUMBER_OF_PROCESSORS +${BUILDER} dist -j $NUMBER_OF_PROCESSORS SIMGRID_VERSION=$(cat VERSION) echo "XX" @@ -201,21 +211,20 @@ fi cmake -G"$GENERATOR" ${INSTALL:+-DCMAKE_INSTALL_PREFIX=$INSTALL} \ -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \ -Denable_model-checking=$(onoff test "$build_mode" = "ModelChecker") \ - -Denable_smpi_MBI_testsuite=OFF \ + -Denable_testsuite_smpi_MBI=OFF -Denable_testsuite_McMini=ON \ -Denable_compile_optimizations=$(onoff test "$build_mode" != "DynamicAnalysis") \ - -Denable_smpi_MPICH3_testsuite=$(onoff test "$build_mode" = "Debug") \ + -Denable_testsuite_smpi_MPICH3=$(onoff test "$build_mode" = "Debug") \ -Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \ -Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \ -Denable_compile_warnings=$(onoff test "$GENERATOR" != "MSYS Makefiles") -Denable_smpi=ON \ -Denable_ns3=$(onoff test "$have_NS3" = "yes" -a "$build_mode" = "Debug") \ -DSIMGRID_PYTHON_LIBDIR=${SIMGRID_PYTHON_LIBDIR} \ - -DCMAKE_DISABLE_SOURCE_CHANGES=ON ${MAY_DISABLE_LTO} ${MAY_HINT_AT_NS3} \ + -DCMAKE_DISABLE_SOURCE_CHANGES=ON ${MAY_DISABLE_LTO} \ -DLTO_EXTRA_FLAG="auto" \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ "$SRCFOLDER" -set +x -make -j $NUMBER_OF_PROCESSORS VERBOSE=1 tests +${BUILDER} -j $NUMBER_OF_PROCESSORS ${VERBOSE_BUILD} tests echo "XX" echo "XX Run the tests" @@ -231,7 +240,7 @@ if test -n "$INSTALL" && [ "${branch_name}" = "origin/master" ] ; then rm -rf "$INSTALL" - make install + ${BUILDER} install fi echo "XX"