Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
avoid failing the tar extraction and working on previous version instead
[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 export PATH=./lib/:../../lib:$PATH
14
15 if test "$(uname -o)" = "Msys"
16 then 
17     cmake -G "MSYS Makefiles" -Denable_java=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_tracing=ON $WORKSPACE
18     make
19     make dist
20     make nsis
21     
22     if [ "$build_mode" = "Debug" ]
23     then
24     cmake -G "MSYS Makefiles" -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON  -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
25     fi
26
27     if [ "$build_mode" = "ModelChecker" ]
28     then
29     cmake -G "MSYS Makefiles" -Denable_coverage=ON -Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=OFF -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
30     fi
31
32     if [ "$build_mode" = "DynamicAnalysis" ]
33     then
34     cmake -G "MSYS Makefiles" -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 .
35     fi
36
37     make
38 else    
39     cmake $WORKSPACE
40     rm Simgrid*.tar.gz
41     make dist
42     tar xzf `cat VERSION`.tar.gz
43     cd `cat VERSION`
44
45     if [ "$build_mode" = "Debug" ]
46     then
47     cmake -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON  -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
48     fi
49
50     if [ "$build_mode" = "ModelChecker" ]
51     then
52     cmake -Denable_coverage=ON -Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
53     fi
54
55     if [ "$build_mode" = "DynamicAnalysis" ]
56     then
57     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 .
58     fi
59
60     make
61     make dist
62 fi
63
64 ctest -T test --no-compress-output  --timeout 100 || true
65 if [ -f Testing/TAG ] ; then
66    xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl -o "$WORKSPACE/CTestResults.xml" Testing/`head -n 1 < Testing/TAG`/Test.xml
67 fi
68
69 ctest -D ContinuousStart
70 ctest -D ContinuousConfigure
71 ctest -D ContinuousBuild
72 ctest -D ContinuousTest
73 ctest -D ContinuousSubmit
74
75 rm -rf `cat VERSION`