Skip to content

Commit ffc9fca

Browse files
committed
upload debug artifacts
1 parent bad94e7 commit ffc9fca

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

.github/workflows/zhook.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
5757
- name: Run in Docker with Core Dumps
5858
if: |
59-
(github.repository_owner == 'openziti' || github.repository_owner == 'netfoundry')
59+
always()
60+
&& (github.repository_owner == 'openziti' || github.repository_owner == 'netfoundry')
6061
&& ((github.event_name != 'pull_request_review')
6162
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
6263
shell: bash
@@ -109,7 +110,8 @@ jobs:
109110
- uses: ./
110111
name: Run as a GH Action from the Local Checkout
111112
if: |
112-
(github.repository_owner == 'openziti' || github.repository_owner == 'netfoundry')
113+
always()
114+
&& (github.repository_owner == 'openziti' || github.repository_owner == 'netfoundry')
113115
&& ((github.event_name != 'pull_request_review')
114116
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
115117
with:
@@ -133,22 +135,8 @@ jobs:
133135
find . -maxdepth 2 -path './.git' -prune -o -print
134136
find $(python -c "import site; print(site.USER_SITE)") -path "*/openziti*" -name "*.so*" -type f -print0 | xargs -0r ldd
135137
138+
# find core dumps produced by the kernel or valgrind
136139
shopt -s nullglob
137-
# find valgrind logs from both execution steps
138-
typeset -a VALGRIND_LOGS=(${GITHUB_WORKSPACE}/*-valgrind-*.log)
139-
if (( ${#VALGRIND_LOGS[@]} )); then
140-
for LOG in "${VALGRIND_LOGS[@]}"; do
141-
if [ -s "$LOG" ]; then
142-
echo "DEBUG: Valgrind log: $LOG"
143-
cat "$LOG"
144-
echo "--- End of $(basename "$LOG") ---"
145-
fi
146-
done
147-
else
148-
echo "DEBUG: No Valgrind logs found"
149-
fi
150-
151-
# find core dumps produced by the kernel and valgrind
152140
typeset -a CORES=(${GITHUB_WORKSPACE}/core.* ${GITHUB_WORKSPACE}/vgcore.*)
153141
shopt -u nullglob
154142
if (( ${#CORES[@]} )); then
@@ -162,3 +150,14 @@ jobs:
162150
else
163151
echo "DEBUG: No core dumps found"
164152
fi
153+
154+
- name: Upload Valgrind Logs and Core Dumps
155+
if: always()
156+
uses: actions/upload-artifact@v4
157+
with:
158+
name: valgrind-logs-and-core-dumps-${{ github.run_id }}
159+
path: |
160+
${{ github.workspace }}/*-valgrind-*.log
161+
${{ github.workspace }}/core.*
162+
${{ github.workspace }}/vgcore.*
163+
if-no-files-found: ignore

0 commit comments

Comments
 (0)