Skip to content

Commit

Permalink
Updates to CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Feb 1, 2025
1 parent 548c2be commit 98c35f7
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 1,690 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,4 @@ examples/QueuedMessageRouter/vs2022/.vs/QueuedMessageRouter/FileContentIndex
examples/QueuedMessageRouter/vs2022/.vs/QueuedMessageRouter/v17
test/etl_error_handler/assert_errors/build-make
test/etl_error_handler/assert_function/build-make
test/syntax_check/bgcc
33 changes: 26 additions & 7 deletions test/run-syntax-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ configuration_name="Configuration Name Not Set"
FailColour='\033[38;2;255;128;128m'
PassColour='\033[38;2;128;255;128m'
TitleColour='\033[38;2;107;210;255m'
HelpColour='\033[38;2;250;180;250m'
NoColour='\033[0m'

ParseGitBranch()
Expand Down Expand Up @@ -39,6 +40,17 @@ PrintHeader()
echo "$NoColour"
}

PrintHelp()
{
echo "$HelpColour"
echo "----------------------------------------------------------------------------------"
echo " Syntax : ./runtests.sh <C++ Standard> <Threads> "
echo " C++ Standard : a, 03, 11, 14, 17 or 20 (a = All standards) "
echo " Threads : Number of threads to use. Default = 4 "
echo "----------------------------------------------------------------------------------"
echo "$NoColour"
}

PassedCompilation()
{
echo "$PassColour"
Expand Down Expand Up @@ -69,11 +81,15 @@ ChecksCompleted()
cd syntax_check || exit 1
echo "" > log.txt



#******************************************************************************
# Set the language standard.
#******************************************************************************
if [ "$1" = "03" ]; then
requested_cxx_standard="03"
if [ "$1" = "3" ]; then
requested_cxx_standard="03"
elif [ "$1" = "11" ]; then
requested_cxx_standard="11"
elif [ "$1" = "14" ]; then
Expand All @@ -82,9 +98,12 @@ elif [ "$1" = "17" ]; then
requested_cxx_standard="17"
elif [ "$1" = "20" ]; then
requested_cxx_standard="20"
else
elif [ "$1" = "A" ]; then
requested_cxx_standard="All"
exit
elif [ "$1" = "a" ]; then
requested_cxx_standard="All"
else
PrintHelp
fi

#******************************************************************************
Expand All @@ -109,7 +128,7 @@ gcc_compiler=$(g++ --version | grep g++)
clang_compiler=$(clang++ --version | grep clang)

###############################################################################
if [ "$requested_cxx_standard" = "03" ]; then
if [ "$requested_cxx_standard" = "03" ] || [ "$requested_cxx_standard" = "All" ]; then
SetCxxStandard "03 (98)"

SetConfigurationName "STL"
Expand Down Expand Up @@ -265,7 +284,7 @@ fi
fi

###############################################################################
if [ "$requested_cxx_standard" = "11" ]; then
if [ "$requested_cxx_standard" = "11" ] || [ "$requested_cxx_standard" = "All" ]; then

SetCxxStandard "11"

Expand Down Expand Up @@ -482,7 +501,7 @@ fi
fi

###############################################################################
if [ "$requested_cxx_standard" = "14" ]; then
if [ "$requested_cxx_standard" = "14" ] || [ "$requested_cxx_standard" = "All" ]; then
SetCxxStandard "14"

SetConfigurationName "STL"
Expand Down Expand Up @@ -698,7 +717,7 @@ fi
fi

###############################################################################
if [ "$requested_cxx_standard" = "17" ]; then
if [ "$requested_cxx_standard" = "17" ] || [ "$requested_cxx_standard" = "All" ]; then
SetCxxStandard "17"

SetConfigurationName "STL"
Expand Down Expand Up @@ -914,7 +933,7 @@ fi
fi

###############################################################################
if [ "$requested_cxx_standard" = "20" ]; then
if [ "$requested_cxx_standard" = "20" ] || [ "$requested_cxx_standard" = "All" ]; then
SetCxxStandard "20"

SetConfigurationName "STL"
Expand Down
4 changes: 2 additions & 2 deletions test/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PrintHelp()
echo " C++ Standard : 11, 14, 17 or 20 "
echo " Optimisation : 0, 1, 2 or 3. Default = 0 "
echo " Threads : Number of threads to use. Default = 4 "
echo " Sanitizer : S enables sanitizer checks. Default disabled "
echo " Sanitizer : s enables sanitizer checks. Default disabled "
echo "----------------------------------------------------------------------------------"
echo "$NoColour"
}
Expand Down Expand Up @@ -153,7 +153,7 @@ fi
#******************************************************************************
# Set the sanitizer enable. Default OFF
#******************************************************************************
if [ "$4" = "S" ]; then
if [ "$4" = "S" ] || [ "$4" = "s" ]; then
sanitize="On"
else
sanitize="Off"
Expand Down
72 changes: 0 additions & 72 deletions test/syntax_check/bgcc/CMakeFiles/3.22.1/CMakeCCompiler.cmake

This file was deleted.

15 changes: 0 additions & 15 deletions test/syntax_check/bgcc/CMakeFiles/3.22.1/CMakeSystem.cmake

This file was deleted.

Loading

0 comments on commit 98c35f7

Please sign in to comment.