Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change execution rights on build scripts
[simgrid.git] / buildtools / jenkins / run.sh
1 #!/bin/bash
2
3 WORKSPACE=$1
4 build_mode=$2
5
6 rm -rf $WORKSPACE/build
7 rm -rf $WORKSPACE/install
8
9 mkdir $WORKSPACE/build
10 mkdir $WORKSPACE/install
11 cd $WORKSPACE/build
12
13 cmake $WORKSPACE
14 make dist
15 tar xzf `cat VERSION`.tar.gz
16 cd `cat VERSION`
17
18 if [ "$build_mode" = "Debug" ]
19 then
20 cmake -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_compile_warnings=ON .
21 fi
22
23 if [ "$build_mode" = "ModelChecker" ]
24 then
25 cmake -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
26 fi
27
28 if [ "$build_mode" = "DynamicAnalysis" ]
29 then
30 cmake -Denable_lua=OFF -Denable_java=ON -Denable_tracing=ON -Denable_smpi=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck=ON .
31 fi
32
33 make
34
35 TRES=0
36
37 ctest -T test --no-compress-output || true
38 if [ -f Testing/TAG ] ; then
39    /usr/bin/xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > CTestResults.xml
40    mv CTestResults.xml $WORKSPACE
41 fi
42
43 if [ "$build_mode" = "Debug" ]
44 then
45 cmake -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_compile_warnings=ON .
46 fi
47
48 if [ "$build_mode" = "ModelChecker" ]
49 then
50 cmake -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
51 fi
52
53 if [ "$build_mode" = "DynamicAnalysis" ]
54 then
55   ctest -D ContinuousStart
56   ctest -D ContinuousConfigure
57   ctest -D ContinuousBuild
58   ctest -D ContinuousMemCheck
59   ctest -D ContinuousSubmit
60 fi
61
62 ctest -D ContinuousStart
63 ctest -D ContinuousConfigure
64 ctest -D ContinuousBuild
65 ctest -D ContinuousTest
66 ctest -D ContinuousSubmit
67
68 rm -rf `cat VERSION`