4 BOOST=$(grep -m 1 "Boost version:" ./consoleText | sed "s/.*-- Boost version: \([a-zA-Z0-9\.]*\)/\1/g")
7 BOOST=$(grep -m 1 "Found Boost:" ./consoleText | sed "s/.*-- Found Boost:.*found suitable version \"\([a-zA-Z0-9\.]*\)\",.*/\1/g")
13 grep -m 1 "The C compiler identification" ./consoleText | sed "s/.*-- The C compiler identification is \([a-zA-Z0-9\.]*\)/\1/g"
17 grep -m 1 "Found Java:" ./consoleText | sed "s/.*-- Found Java.*found suitable version \"\([a-zA-Z0-9\.]*\)\",.*/\1/g"
21 grep -m 1 "Cmake version" ./consoleText| sed "s/.*-- Cmake version \([a-zA-Z0-9\.]*\)/\1/g"
25 grep -m 1 "ns-3 found (v3.[0-9]*; incl:" ./consoleText | sed "s/.*-- ns-3 found .v\(3.[0-9]*\); incl:.*/\1/g"
26 # found=$(grep -c "ns-3 found" ./consoleText)
27 # if [ "$found" != 0 ]; then
35 found=$(grep -c "Compile Python bindings .....: ON" ./consoleText)
36 if [ "$found" != 0 ]; then
37 grep -m 1 "Found Python3" ./consoleText| sed "s/.*-- Found Python3.*found version \"\([a-zA-Z0-9\.]*\)\".*/\1/g"
43 if [ -f consoleText ]; then
48 if [ -z "$BUILD_URL" ]; then
49 BUILD_URL="https://ci.inria.fr/simgrid/job/SimGrid/lastBuild"
52 #get the list of nodes on jenkins
53 wget --quiet ${BUILD_URL}/consoleText >/dev/null 2>&1
54 nodes=($(sed -n 's/^Triggering SimGrid [^ ]* Debug,//p' ./consoleText| sort))
58 echo "<br>Description of the nodes - Automatically updated by project_description.sh script - Don't edit here<br><br>
60 function compareVersion(v1, v2) {
61 if (typeof v1 !== 'string') return false;
62 if (typeof v2 !== 'string') return false;
65 const k = Math.min(v1.length, v2.length);
66 for (let i = 0; i < k; ++ i) {
67 v1[i] = parseInt(v1[i], 10);
68 v2[i] = parseInt(v2[i], 10);
69 if (v1[i] > v2[i]) return 1;
70 if (v1[i] < v2[i]) return -1;
72 return v1.length == v2.length ? 0: (v1.length < v2.length ? -1 : 1);
75 function sortTable(n, type) {
76 var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;
77 table = document.getElementById('configuration-matrix');
79 //Set the sorting direction to ascending:
81 /*Make a loop that will continue until
82 no switching has been done:*/
84 //start by saying: no switching is done:
87 /*Loop through all table rows (except the
88 first, which contains table headers):*/
89 for (i = 1; i < (rows.length - 1); i++) {
90 //start by saying there should be no switching:
92 /*Get the two elements you want to compare,
93 one from current row and one from the next:*/
94 x = rows[i].getElementsByTagName('TD')[n];
95 y = rows[i + 1].getElementsByTagName('TD')[n];
96 /*check if the two rows should switch place,
97 based on the direction, asc or desc:*/
99 if(type == 'version'){
100 shouldSwitch = (compareVersion(x.innerHTML.toLowerCase(), y.innerHTML.toLowerCase()) > 0);
102 shouldSwitch = (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase());
104 } else if (dir == 'desc') {
105 if(type == 'version'){
106 shouldSwitch = (compareVersion(x.innerHTML.toLowerCase(), y.innerHTML.toLowerCase()) < 0);
108 shouldSwitch = (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase());
115 /*If a switch has been marked, make the switch
116 and mark that a switch has been done:*/
117 rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
119 //Each time a switch is done, increase this count by 1:
122 /*If no switching has been done AND the direction is 'asc',
123 set the direction to 'desc' and run the while loop again.*/
124 if (switchcount == 0 && dir == 'asc') {
131 <table id=configuration-matrix>
132 <tr class=matrix-row> <td class=matrix-header style=min-width:75px onclick='sortTable(0);'>Name of the Builder</td><td class=matrix-header style=min-width:75px onclick='sortTable(1);'>OS</td><td class=matrix-header style=min-width:75px onclick='sortTable(2);'>Compiler</td><td class=matrix-header style=min-width:75px onclick=\"sortTable(3, 'version');\">Boost</td><td class=matrix-header style=min-width:75px onclick=\"sortTable(4,'version');\">Java</td><td class=matrix-header style=min-width:75px onclick=\"sortTable(5,'version');\">Cmake</td><td class=matrix-header style=min-width:50px onclick='sortTable(6);'>ns-3</td><td class=matrix-header style=min-width:50px onclick='sortTable(7);'>Python</td><td class=matrix-header style=min-width:50px onclick='sortTable(1);'>Debug</td><td class=matrix-header style=min-width:50px onclick='sortTable(1);'>MC</td></tr>"
134 for node in "${nodes[@]}"
136 wget --quiet --output-document=consoleText \
137 ${BUILD_URL}/build_mode=Debug,node=${node}/consoleText \
138 ${BUILD_URL}/build_mode=ModelChecker,node=${node}/consoleText \
140 if [ ! -f consoleText ]; then
141 echo "file not existing for node ${node}"
145 compiler=$(get_compiler)
150 os=$(grep -m 1 "OS Version" ./consoleText| sed "s/OS Version : \(.*\)/\1/g")
154 #in case of success, replace blue by green in status balls
155 wget --quiet https://ci.inria.fr/simgrid/buildStatus/text?job=SimGrid%2Fbuild_mode%3DDebug%2Cnode%3D"${node}" -O status >/dev/null 2>&1
157 if [ "$status" == "Success" ]; then
158 color1="&color=green"
161 statusmc="<img src=https://ci.inria.fr/simgrid/images/24x24/disabled.png>"
162 wget --quiet https://ci.inria.fr/simgrid/buildStatus/text?job=SimGrid%2Fbuild_mode%3DModelChecker%2Cnode%3D"${node}" -O status >/dev/null 2>&1
164 if [ "$status" ]; then
165 if [ "$status" == "Success" ]; then
166 color2="&color=green"
168 statusmc="<a href=\"build_mode=ModelChecker,node=${node}/\"><img src=\"https://ci.inria.fr/simgrid/job/SimGrid/build_mode=ModelChecker,node=${node}/badge/icon?style=ball-24x24${color2}\"/>"
171 echo "<tr> <td class=\"matrix-leftcolumn\">$node</td><td class=\"matrix-cell\" style=\"text-align:left\">$os</td><td class=\"matrix-cell\" style=\"text-align:left\">$compiler</td><td class=\"matrix-cell\" style=\"text-align:left\">$boost</td><td class=\"matrix-cell\" style=\"text-align:left\">$java</td><td class=\"matrix-cell\" style=\"text-align:left\">$cmake</td><td class=\"matrix-cell\" style=\"text-align:center\">$ns3</td><td class=\"matrix-cell\" style=\"text-align:center\">$py</td><td class=\"matrix-cell\" style=\"text-align:center\"><a href=\"build_mode=Debug,node=${node}/\"><img src=\"https://ci.inria.fr/simgrid/job/SimGrid/build_mode=Debug,node=${node}/badge/icon?style=ball-24x24${color1}\"/></td><td class=\"matrix-cell\" style=\"text-align:center\">${statusmc}</td></tr>"
176 #Appveyor - get ID of the last job with the API
177 BUILD_ID=$(curl -s "https://ci.appveyor.com/api/projects/mquinson/simgrid" | grep -o '\[{"jobId":"[a-zA-Z0-9]*",' | sed "s/\[{\"jobId\":\"//" | sed "s/\",//")
178 wget --quiet https://ci.appveyor.com/api/buildjobs/"$BUILD_ID"/log -O ./consoleText >/dev/null 2>&1
179 sed -i -e "s/\r//g" ./consoleText
180 node="<a href=\"https://ci.appveyor.com/project/mquinson/simgrid\">appveyor</a>"
181 os="Windows Server 2012 - VS2015 + mingw64 5.3.0"
183 compiler=$(get_compiler)
188 success=$(grep -m 1 "Build success" ./consoleText)
190 if [ -n "$success" ]; then
193 echo "<tr> <td class=\"matrix-leftcolumn\">$node</td><td class=\"matrix-cell\" style=\"text-align:left\">$os</td><td class=\"matrix-cell\" style=\"text-align:left\">$compiler</td><td class=\"matrix-cell\" style=\"text-align:left\">$boost</td><td class=\"matrix-cell\" style=\"text-align:left\">$java</td><td class=\"matrix-cell\" style=\"text-align:left\">$cmake</td><td class=\"matrix-cell\" style=\"text-align:center\">$ns3</td><td class=\"matrix-cell\" style=\"text-align:center\">$py</td><td class=\"matrix-cell\" style=\"text-align:center\"><img src=https://ci.inria.fr/simgrid/images/24x24/${ball}></td><td class=\"matrix-cell\" style=\"text-align:center\"><img src=https://ci.inria.fr/simgrid/images/24x24/disabled.png></td></tr>"