@@ -271,10 +271,16 @@ jobs:
271
271
fi
272
272
done
273
273
274
+ - name : Install JQ
275
+ run : sudo apt update && sudo apt install jq -y
276
+
274
277
# Do the execution
275
278
- name : Begin Execution
276
279
# $(docker image ls | grep "<none>" | awk '{print $3;}') to get image id
277
280
run : |
281
+ # Prepare files
282
+ echo "[]" > ${{ github.workspace }}/total_exec_summary.json
283
+ echo "[]" > ${{ github.workspace }}/full_tracer.json
278
284
# The /* goes on the outside, otherwise bash just interprets a string!
279
285
for file in "$GITHUB_WORKSPACE/set_${{ matrix.sets }}"/*; do
280
286
echo "\"$file\""
@@ -286,9 +292,14 @@ jobs:
286
292
echo "Running \"${file}\" in output folder \"${base_extless_name}_output\""
287
293
sim_input="/root/${base_name}"
288
294
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)
290
296
291
297
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
292
303
# Check for individual Success
293
304
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name errorLog.txt | wc -l) -ne 0 ]
294
305
then
@@ -298,6 +309,27 @@ jobs:
298
309
else
299
310
echo "No errors found in set $GITHUB_WORKSPACE/set_${{ matrix.sets }}"
300
311
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
301
333
fi
302
334
done
303
335
@@ -319,6 +351,18 @@ jobs:
319
351
name : set_${{ matrix.sets }}.report
320
352
path : ${{ github.workspace }}/errors.report
321
353
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
+
322
366
# Report a Problem to Slack
323
367
- name : Report Problem to Slack
324
368
if : ${{ failure() }}
@@ -358,11 +402,26 @@ jobs:
358
402
with :
359
403
path : ${{ github.workspace }}/bmdb-results
360
404
405
+ - name : Install JQ
406
+ run : sudo apt update && sudo apt install jq -y
407
+
361
408
- name : Combine .report artifacts into one file
362
409
run : cat $(find $GITHUB_WORKSPACE/bmdb-results -name 'errors.report') > $GITHUB_WORKSPACE/combined.txt
363
410
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
+
364
417
- name : Post results to slack part 1
365
418
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
366
419
367
420
- name : Post results to slack part 2
368
421
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
0 commit comments