Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/check-geometry-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ jobs:
setup: install/bin/thisepic.sh
run: |
export DETECTOR_CACHE=/opt/detector/epic-main/share/epic
MEMORY_LIMIT_KB=1300000 # 1.3 GB – update this deliberately when geometry grows
IFS=, read -a configs <<< "${{inputs.detector_configs}}"
overall_rc=0
for config in ${configs[@]} ; do
echo "::group::${config}" ;
checkGeometry -c ${DETECTOR_PATH}/${config}.xml ;
echo "::endgroup::" ;
/usr/bin/time -v -o /tmp/time_${config}.txt \
checkGeometry -c ${DETECTOR_PATH}/${config}.xml
rc=$?
peak_rss_kb=$(grep "Maximum resident set size" /tmp/time_${config}.txt | awk '{print $NF}')
echo "Peak RSS for ${config}: ${peak_rss_kb} kB (limit: ${MEMORY_LIMIT_KB} kB)"
echo "::endgroup::"
if [ "${peak_rss_kb}" -gt "${MEMORY_LIMIT_KB}" ]; then
Comment thread
wdconinc marked this conversation as resolved.
echo "::error::Memory limit exceeded for ${config}: ${peak_rss_kb} kB > ${MEMORY_LIMIT_KB} kB"
overall_rc=1
fi
[ $rc -ne 0 ] && overall_rc=$rc
done
exit $overall_rc
Loading