Skip to content

Commit

Permalink
GHA, ci.sh: dump debug log in separate step.
Browse files Browse the repository at this point in the history
- In ci.sh just print the path to the debug log file on errors.
- In GHA workflow, dump the debug log in a separate final step if there
  were errors. This will make it more usable for tracking down errors.
  • Loading branch information
kanaka committed Aug 22, 2024
1 parent 59480c8 commit 25de516
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ jobs:
# Check that self-hosted mode really ran
[ "`grep -a "mal-user>" test-mal-*${IMPL}.debug | wc -l`" -gt 800 ]
fi
- name: Print debug log
if: failure()
run: cat *.debug
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -134,6 +137,9 @@ jobs:
# Check that self-hosted mode really ran
[ "`grep -a "mal-user>" test-mal-*${IMPL}.debug | wc -l`" -gt 800 ]
fi
- name: Print debug log
if: failure()
run: cat *.debug
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -181,6 +187,9 @@ jobs:
run: |
export ${{ matrix.IMPL }}
./ci.sh perf ${IMPL}
- name: Print debug log
if: failure()
run: cat *.debug
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ test|perf)
${DEFERRABLE:+DEFERRABLE=${DEFERRABLE}} \
${OPTIONAL:+OPTIONAL=${OPTIONAL}} \
${ACTION}^${IMPL}${STEP:+^${STEP}}; then
# print debug-file on error
cat ${log_prefix}.debug
# show debug-file path on error
echo "Full debug log is at: ${log_prefix}.debug"
false
fi
;;
Expand Down

0 comments on commit 25de516

Please sign in to comment.