Commit fc482f37 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'better-ci' into 'develop'

fix(ci): better detection of build stages

See merge request oai/cn5g/oai-cn5g-ausf!6
parents 0f32e538 02fd0d3a
...@@ -37,6 +37,7 @@ source $THIS_SCRIPT_PATH/build_helper.libconfig ...@@ -37,6 +37,7 @@ source $THIS_SCRIPT_PATH/build_helper.libconfig
#arg1 is force (0 or 1) (no interactive script) #arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries) #arg2 is debug (0 or 1) (install debug libraries)
install_fmt() { install_fmt() {
echo "Starting to install fmt"
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
read -p "Do you want to install open-source formatting library for C++ ? <y/N> " prompt read -p "Do you want to install open-source formatting library for C++ ? <y/N> " prompt
OPTION="" OPTION=""
...@@ -65,6 +66,7 @@ install_fmt() { ...@@ -65,6 +66,7 @@ install_fmt() {
cd /tmp cd /tmp
rm -rf /tmp/fmt* rm -rf /tmp/fmt*
fi fi
echo "fmt installation complete"
return 0 return 0
} }
...@@ -72,6 +74,7 @@ install_fmt() { ...@@ -72,6 +74,7 @@ install_fmt() {
#arg1 is force (0 or 1) (no interactive script) #arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries) #arg2 is debug (0 or 1) (install debug libraries)
install_spdlog_from_git() { install_spdlog_from_git() {
echo "Starting to install spdlog"
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
read -p "Do you want to install spdlog ? <y/N> " prompt read -p "Do you want to install spdlog ? <y/N> " prompt
OPTION="" OPTION=""
...@@ -104,6 +107,7 @@ install_spdlog_from_git() { ...@@ -104,6 +107,7 @@ install_spdlog_from_git() {
sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h
popd popd
fi fi
echo "spdlog installation complete"
return 0 return 0
} }
...@@ -111,6 +115,7 @@ install_spdlog_from_git() { ...@@ -111,6 +115,7 @@ install_spdlog_from_git() {
#arg1 is force (0 or 1) (no interactive script) #arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries) #arg2 is debug (0 or 1) (install debug libraries)
install_pistache_from_git() { install_pistache_from_git() {
echo "Starting to install pistache"
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
read -p "Do you want to install Pistache ? <y/N> " prompt read -p "Do you want to install Pistache ? <y/N> " prompt
OPTION="-y" OPTION="-y"
...@@ -153,6 +158,7 @@ install_pistache_from_git() { ...@@ -153,6 +158,7 @@ install_pistache_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd popd
fi fi
echo "pistache installation complete"
return 0 return 0
} }
...@@ -160,6 +166,7 @@ install_pistache_from_git() { ...@@ -160,6 +166,7 @@ install_pistache_from_git() {
#arg1 is force (0 or 1) (no interactive script) #arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries) #arg2 is debug (0 or 1) (install debug libraries)
install_nlohmann_from_git() { install_nlohmann_from_git() {
echo "Starting to install Nlohmann Json"
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
read -p "Do you want to install Nlohmann Json ? <y/N> " prompt read -p "Do you want to install Nlohmann Json ? <y/N> " prompt
OPTION="" OPTION=""
...@@ -198,6 +205,7 @@ install_nlohmann_from_git() { ...@@ -198,6 +205,7 @@ install_nlohmann_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd popd
fi fi
echo "Nlohmann Json installation complete"
return 0 return 0
} }
...@@ -205,6 +213,7 @@ install_nlohmann_from_git() { ...@@ -205,6 +213,7 @@ install_nlohmann_from_git() {
#arg1 is force (0 or 1) (no interactive script) #arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries) #arg2 is debug (0 or 1) (install debug libraries)
install_nghttp2_from_git() { install_nghttp2_from_git() {
echo "Starting to install nghttp2"
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
read -p "Do you want to install nghttp2 ? <y/N> " prompt read -p "Do you want to install nghttp2 ? <y/N> " prompt
OPTION="" OPTION=""
...@@ -286,6 +295,7 @@ install_nghttp2_from_git() { ...@@ -286,6 +295,7 @@ install_nghttp2_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd popd
fi fi
echo "nghttp2 installation complete"
return 0 return 0
} }
...@@ -342,6 +352,7 @@ check_install_ausf_deps() { ...@@ -342,6 +352,7 @@ check_install_ausf_deps() {
automake \ automake \
make \ make \
bison \ bison \
gcc-c++ \
$CMAKE \ $CMAKE \
doxygen \ doxygen \
flex \ flex \
...@@ -410,6 +421,7 @@ check_install_ausf_deps() { ...@@ -410,6 +421,7 @@ check_install_ausf_deps() {
echo "Install distro libs" echo "Install distro libs"
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST $SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret ret=$?;[[ $ret -ne 0 ]] && return $ret
echo "distro libs installation complete"
install_spdlog_from_git $1 $2 install_spdlog_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret ret=$?;[[ $ret -ne 0 ]] && return $ret
...@@ -522,5 +534,3 @@ check_install_ausf_min_deps() { ...@@ -522,5 +534,3 @@ check_install_ausf_min_deps() {
return 0 return 0
} }
...@@ -487,24 +487,26 @@ class HtmlReport(): ...@@ -487,24 +487,26 @@ class HtmlReport():
result = re.search('AUSF deps installation successful', line) result = re.search('AUSF deps installation successful', line)
if result is not None: if result is not None:
status = True status = True
result = re.search('Install spdlog from https://github.com/gabime/spdlog.git', line) result = re.search('distro libs installation complete', line)
if result is not None: if result is not None:
package_install = True package_install = True
spdlog_build_start = True result = re.search('Starting to install spdlog', line)
result = re.search('Branch \'master\' set up to track remote branch \'master\' from \'origin\'', line)
if result is not None: if result is not None:
spdlog_build_start = True
result = re.search('spdlog installation complete', line)
if result is not None and spdlog_build_start:
spdlog_build_status = True spdlog_build_status = True
result = re.search('Install Pistache from', line) result = re.search('Starting to install pistache', line)
if result is not None: if result is not None:
pistache_build_start = True pistache_build_start = True
result = re.search('Installing: /usr/local/lib/libpistache.a', line) result = re.search('pistache installation complete', line)
if result is not None: if result is not None and pistache_build_start:
pistache_build_status = True pistache_build_status = True
result = re.search('Install Nlohmann Json', line) result = re.search('Starting to install Nlohmann Json', line)
if result is not None: if result is not None:
json_build_status = True json_build_status = True
result = re.search('Installing: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonTargets.cmake', line) result = re.search('Nlohmann Json installation complete', line)
if result is not None: if result is not None and json_build_status:
json_build_status = True json_build_status = True
logfile.close() logfile.close()
if base_image: if base_image:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment