Skip to content

Commit

Permalink
HPCC-32168 Add Dynamic ECL-Bundles Listing Feature for Bundle Testing…
Browse files Browse the repository at this point in the history
… Action File

Signed-off-by: Charan-Sharan <[email protected]>
  • Loading branch information
Charan-Sharan committed Jun 27, 2024
1 parent 90ab9c9 commit 8ee706e
Showing 1 changed file with 48 additions and 11 deletions.
59 changes: 48 additions & 11 deletions .github/workflows/bundleTest-thor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ env:
uploadArtifact: false

jobs:

main:
runs-on: ${{ inputs.os }}
steps:
Expand Down Expand Up @@ -78,6 +77,44 @@ jobs:
sudo chown -R $USER:$USER /opt/HPCCSystems
sudo xmlstarlet ed -L -u 'Environment/Software/ThorCluster/@slavesPerNode' -v 2 -u 'Environment/Software/ThorCluster/@channelsPerSlave' -v 1 /etc/HPCCSystems/environment.xml
- name: Checkout ecl-bundles repository
uses: actions/checkout@v4
with:
repository: hpcc-systems/ecl-bundles

- name: Scrap Bundles List
shell: "bash"
run: |
TABLES_DATA=$( cat README.rst | grep -oE -e "\|[^\|]*\|" -e "==.*==" | sed 's/|//g' )
IFS=$'\n'
HEADER_NUM_ECL_BUNDLES=2
HEADER_COUNT=0
for LINE in $TABLES_DATA
do
LINE=${LINE# } #removing space from begining of the line
LINE=${LINE%% *} #remove trailing spaces.
if [[ ${LINE:0:1} == "=" ]]; then
HEADER_COUNT=$(( HEADER_COUNT + 1 ))
continue
fi
if [[ $HEADER_COUNT -eq $HEADER_NUM_ECL_BUNDLES ]]; then
if [[ ${LINE:0:4} == "http" ]]; then
echo -e "Bundle Repo : ${LINE}\n"
BUNDLE=$( basename $LINE )
BUNDLES_TO_TEST+=" ${BUNDLE%.git}"
else
echo "Bundle Name : ${LINE}"
fi
elif [[ $HEADER_COUNT -eq $(( HEADER_NUM_ECL_BUNDLES + 1 )) ]]; then
break
fi
done
BUNDLES_TO_TEST=$(echo $BUNDLES_TO_TEST | sed 's/ /\n/g' | sort | uniq -i )
# ( print bundles list | replace all spaces with new-line | sort the list | select unique items )
BUNDLES_TO_TEST=${BUNDLES_TO_TEST//$'\n'/ } # replace all newline characters with spaces
echo "BUNDLES TO TEST : $BUNDLES_TO_TEST"
echo $BUNDLES_TO_TEST >> $GITHUB_ENV
- name: Install ML Dependencies
shell: "bash"
run: |
Expand All @@ -97,16 +134,16 @@ jobs:
if: ${{ inputs.test-core-file-generation }}
shell: "bash"
run: |
echo """
boolean seg() := beginc++ #option action
#include <csignal>
#body
raise(SIGABRT);
return false;
endc++;
output(seg()); """ > crash.ecl
ecl run -t hthor crash.ecl
echo """
boolean seg() := beginc++ #option action
#include <csignal>
#body
raise(SIGABRT);
return false;
endc++;
output(seg()); """ > crash.ecl
ecl run -t hthor crash.ecl
continue-on-error: true

- name: Get test from Github
Expand Down

0 comments on commit 8ee706e

Please sign in to comment.