4 grep -m 1 "Boost version:" ./consoleText | sed "s/.*-- Boost version: \([a-zA-Z0-9\.]*\)/\1/g"
8 grep -m 1 "The C compiler identification" ./consoleText | sed "s/.*-- The C compiler identification is \([a-zA-Z0-9\.]*\)/\1/g"
12 grep -m 1 "Found Java:" ./consoleText | sed "s/.*-- Found Java.*found suitable version \"\([a-zA-Z0-9\.]*\)\",.*/\1/g"
16 grep -m 1 "Cmake version" ./consoleText| sed "s/.*-- Cmake version \([a-zA-Z0-9\.]*\)/\1/g"
20 found=$(grep -c "NS-3 found" ./consoleText)
21 if [ $found != 0 ]; then
29 found=$(grep -c "Compile Python bindings .....: ON" ./consoleText)
30 if [ $found != 0 ]; then
37 if [ -f consoleText ]; then
42 if [ -z $BUILD_URL ]; then
43 BUILD_URL="https://ci.inria.fr/simgrid/job/SimGrid/lastBuild"
46 #get the list of nodes on jenkins
47 wget --quiet ${BUILD_URL}/consoleText >/dev/null 2>&1
48 nodes=($(sed -n 's/^Triggering SimGrid [^ ]* Debug,//p' ./consoleText| sort))
52 echo "<br>Description of the nodes - Automatically updated by project_description.sh script - Don't edit here<br><br>
54 function compareVersion(v1, v2) {
55 if (typeof v1 !== 'string') return false;
56 if (typeof v2 !== 'string') return false;
59 const k = Math.min(v1.length, v2.length);
60 for (let i = 0; i < k; ++ i) {
61 v1[i] = parseInt(v1[i], 10);
62 v2[i] = parseInt(v2[i], 10);
63 if (v1[i] > v2[i]) return 1;
64 if (v1[i] < v2[i]) return -1;
66 return v1.length == v2.length ? 0: (v1.length < v2.length ? -1 : 1);
69 function sortTable(n, type) {
70 var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;
71 table = document.getElementById('configuration-matrix');
73 //Set the sorting direction to ascending:
75 /*Make a loop that will continue until
76 no switching has been done:*/
78 //start by saying: no switching is done:
81 /*Loop through all table rows (except the
82 first, which contains table headers):*/
83 for (i = 1; i < (rows.length - 1); i++) {
84 //start by saying there should be no switching:
86 /*Get the two elements you want to compare,
87 one from current row and one from the next:*/
88 x = rows[i].getElementsByTagName('TD')[n];
89 y = rows[i + 1].getElementsByTagName('TD')[n];
90 /*check if the two rows should switch place,
91 based on the direction, asc or desc:*/
93 if(type == 'version'){
94 shouldSwitch = (compareVersion(x.innerHTML.toLowerCase(), y.innerHTML.toLowerCase()) > 0);
96 shouldSwitch = (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase());
98 } else if (dir == 'desc') {
99 if(type == 'version'){
100 shouldSwitch = (compareVersion(x.innerHTML.toLowerCase(), y.innerHTML.toLowerCase()) < 0);
102 shouldSwitch = (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase());
109 /*If a switch has been marked, make the switch
110 and mark that a switch has been done:*/
111 rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
113 //Each time a switch is done, increase this count by 1:
116 /*If no switching has been done AND the direction is 'asc',
117 set the direction to 'desc' and run the while loop again.*/
118 if (switchcount == 0 && dir == 'asc') {
125 <table id=configuration-matrix>
126 <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);'>NS3</td><td class=matrix-header style=min-width:50px onclick='sortTable(7);'>Python</td></tr>"
128 for node in "${nodes[@]}"
130 wget --quiet ${BUILD_URL}/build_mode=Debug,node=${node}/consoleText >/dev/null 2>&1
131 if [ ! -f consoleText ]; then
132 echo "file not existing for node ${node}"
136 compiler=$(get_compiler)
141 os=$(grep -m 1 "OS Version" ./consoleText| sed "s/OS Version : \(.*\)/\1/g")
142 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></tr>"
147 #Travis - get ID of the last jobs with the API
148 BUILD_NUM=$(curl -s 'https://api.travis-ci.org/repos/simgrid/simgrid/builds?limit=1' | grep -o '^\[{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n')
149 BUILDS=($(curl -s https://api.travis-ci.org/repos/simgrid/simgrid/builds/${BUILD_NUM} | grep -o '{"id":[0-9]*,' | grep -o '[0-9]*'| tail -n 2))
151 for id in "${!BUILDS[@]}"
153 wget --quiet https://api.travis-ci.org/v3/job/${BUILDS[$id]}/log.txt -O ./consoleText >/dev/null 2>&1
154 sed -i -e "s/\r//g" ./consoleText
155 if [ $id == 0 ]; then
156 node="<a href=\"https://travis-ci.org/simgrid/simgrid\">travis-linux</a>"
157 os="Ubuntu 16.04 (<a href=\"https://docs.travis-ci.com/user/reference/xenial/\">xenial</a>) 64 bits"
159 node="<a href=\"https://travis-ci.org/simgrid/simgrid\">travis-mac</a>"
160 os="Mac OSX High Sierra (kernel: 17.4.0)"
163 compiler=$(get_compiler)
168 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></tr>"
172 #Appveyor - get ID of the last job with the API
173 BUILD_ID=$(curl -s "https://ci.appveyor.com/api/projects/mquinson/simgrid" | grep -o '\[{"jobId":"[a-zA-Z0-9]*",' | sed "s/\[{\"jobId\":\"//" | sed "s/\",//")
174 wget --quiet https://ci.appveyor.com/api/buildjobs/$BUILD_ID/log -O ./consoleText >/dev/null 2>&1
175 sed -i -e "s/\r//g" ./consoleText
176 node="<a href="https://ci.appveyor.com/project/mquinson/simgrid">appveyor</a>"
177 os="Windows Server 2012 - VS2015 + mingw64 5.3.0"
179 compiler=$(get_compiler)
184 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></tr>"