Skip to content

Commit 8ea307a

Browse files
Updating to use new command
1 parent e9b055a commit 8ea307a

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

.github/workflows/NightlyBMDB_CLI.yml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,16 @@ jobs:
271271
fi
272272
done
273273
274+
- name: Install JQ
275+
run: sudo apt update && sudo apt install jq -y
276+
274277
# Do the execution
275278
- name: Begin Execution
276279
#$(docker image ls | grep "<none>" | awk '{print $3;}') to get image id
277280
run: |
281+
# Prepare files
282+
echo "[]" > ${{ github.workspace }}/total_exec_summary.json
283+
echo "[]" > ${{ github.workspace }}/full_tracer.json
278284
# The /* goes on the outside, otherwise bash just interprets a string!
279285
for file in "$GITHUB_WORKSPACE/set_${{ matrix.sets }}"/*; do
280286
echo "\"$file\""
@@ -286,9 +292,14 @@ jobs:
286292
echo "Running \"${file}\" in output folder \"${base_extless_name}_output\""
287293
sim_input="/root/${base_name}"
288294
sim_output="/root/${base_extless_name}_output"
289-
docker run -v $GITHUB_WORKSPACE/set_${{ matrix.sets }}:/root $(docker image ls | grep "<none>" | awk '{print $3;}') execute -d -i ${sim_input} -o ${sim_output} --writeLogFiles --guaranteeGoodReturnCode
295+
vcell_result=$(docker run -v $GITHUB_WORKSPACE/set_${{ matrix.sets }}:/root $(docker image ls | grep "<none>" | awk '{print $3;}') execute-omex -d -i ${sim_input} -o ${sim_output} --writeLogFiles)
290296
291297
echo -e "\n\n\n\n\n" # give ourselves some line separation
298+
# Check if we failed early and got no error log
299+
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name errorLog.txt | wc -l) -eq 0 ] && [ ${vcell_result} -ne 0 ]
300+
then
301+
echo "${base_extless_name}" >> $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output/errorLog.txt
302+
fi
292303
# Check for individual Success
293304
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name errorLog.txt | wc -l) -ne 0 ]
294305
then
@@ -298,6 +309,27 @@ jobs:
298309
else
299310
echo "No errors found in set $GITHUB_WORKSPACE/set_${{ matrix.sets }}"
300311
fi
312+
313+
# Grab Summary
314+
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name exec_summary.json | wc -l) -ne 0 ]
315+
then
316+
# Append to master summary in github workspace
317+
jq '. + [inputs]' ${{ github.workspace }}/total_exec_summary.json $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name exec_summary.json) > temp.json
318+
mv temp.json ${{ github.workspace }}/total_exec_summary.json
319+
else
320+
echo "No summary found in set $GITHUB_WORKSPACE/set_${{ matrix.sets }}"
321+
fi
322+
323+
# Grab Trace
324+
# Check for individual Success
325+
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name tracer.json | wc -l) -ne 0 ]
326+
then
327+
# Append to master trace in github workspace
328+
jq '. + inputs' ${{ github.workspace }}/full_tracer.json $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name tracer.json) > temp_2.json
329+
mv temp_2.json ${{ github.workspace }}/full_tracer.json
330+
else
331+
echo "No trace found in set $GITHUB_WORKSPACE/set_${{ matrix.sets }}"
332+
fi
301333
fi
302334
done
303335
@@ -319,6 +351,18 @@ jobs:
319351
name: set_${{ matrix.sets }}.report
320352
path: ${{ github.workspace }}/errors.report
321353

354+
- name: Upload summary
355+
uses: actions/upload-artifact@v3
356+
with:
357+
name: set_${{ matrix.sets }}.summary
358+
path: ${{ github.workspace }}/total_exec_summary.json
359+
360+
- name: Upload tracer
361+
uses: actions/upload-artifact@v3
362+
with:
363+
name: set_${{ matrix.sets }}.tracer
364+
path: ${{ github.workspace }}/full_tracer.json
365+
322366
# Report a Problem to Slack
323367
- name: Report Problem to Slack
324368
if: ${{ failure() }}
@@ -358,11 +402,26 @@ jobs:
358402
with:
359403
path: ${{ github.workspace }}/bmdb-results
360404

405+
- name: Install JQ
406+
run: sudo apt update && sudo apt install jq -y
407+
361408
- name: Combine .report artifacts into one file
362409
run: cat $(find $GITHUB_WORKSPACE/bmdb-results -name 'errors.report') > $GITHUB_WORKSPACE/combined.txt
363410

411+
- name: Combine .summary artifacts into one file
412+
run: jq -s 'add' $(find $GITHUB_WORKSPACE/bmdb-results -name 'total_exec_summary.json') > $GITHUB_WORKSPACE/summary.json
413+
414+
- name: Combine .summary artifacts into one file
415+
run: jq -s 'add' $(find $GITHUB_WORKSPACE/bmdb-results -name 'full_tracer.json') > $GITHUB_WORKSPACE/tracer.json
416+
364417
- name: Post results to slack part 1
365418
run: curl -X POST -F token="${{ secrets.SLACK_BOT_TOKEN }}" -F channel=${{ secrets.SLACK_CHANNEL_VCELL_DEV_TOKEN }} -F text="Here're the $(cat ${GITHUB_WORKSPACE}/combined.txt | wc -l) BMDB models that didn't pass:" https://slack.com/api/chat.postMessage
366419

367420
- name: Post results to slack part 2
368421
run: curl -X POST -F token="${{ secrets.SLACK_BOT_TOKEN }}" -F channel=${{ secrets.SLACK_CHANNEL_VCELL_DEV_TOKEN }} -F text="$(sort ${GITHUB_WORKSPACE}/combined.txt)" https://slack.com/api/chat.postMessage
422+
423+
- name: Post results to slack part 3
424+
run: curl -X POST -F token="${{ secrets.SLACK_BOT_TOKEN }}" -F channel=${{ secrets.SLACK_CHANNEL_VCELL_DEV_TOKEN }} -F file=$GITHUB_WORKSPACE/summary.json https://slack.com/api/files.upload
425+
426+
- name: Post results to slack part 4
427+
run: curl -X POST -F token="${{ secrets.SLACK_BOT_TOKEN }}" -F channel=${{ secrets.SLACK_CHANNEL_VCELL_DEV_TOKEN }} -F file=$GITHUB_WORKSPACE/tracer.json https://slack.com/api/files.upload

docker_run.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ case "$rawCommand" in
4747
command="execute"
4848
shift
4949
;;
50+
"execute-omex")
51+
echo 'special testing execution mode requested'
52+
command="execute-omex"
53+
shift
54+
;;
5055
"validate")
5156
echo 'validate mode requested'
5257
command="validate"

0 commit comments

Comments
 (0)