Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[jenkins] Check build mode before making the archive
[simgrid.git] / buildtools / jenkins / build.sh
index 1e440f5..3af2e94 100755 (executable)
@@ -2,8 +2,12 @@
 
 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
@@ -43,11 +47,6 @@ 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`
-
 case "$build_mode" in
   "Debug")
   ;;
@@ -63,6 +62,11 @@ case "$build_mode" in
   ;;
 esac
 
+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") \