- name: install requirements
if: env.rebuild == '1'
run: |
- sudo apt-get update && sudo apt-get install -y libglib2.0-dev libjson-glib-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev googletest
+ sudo apt-get update && sudo apt-get install -y libglib2.0-dev libjson-glib-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev googletest gdb
sudo apt-get install -y liborc-0.4-dev flex bison libopencv-dev pkg-config python3-dev python3-numpy python3
sudo add-apt-repository -y ppa:nnstreamer/ppa && sudo apt-get update && sudo apt-get install -y ssat libpaho-mqtt-dev
sudo apt-get install -y valgrind gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base libgtest-dev libpng-dev libc6-dbg binutils-x86-64-linux-gnu-dbg valgrind-dbg
run: |
meson setup build/
meson compile -C build/
+
+ sudo mkdir -m 777 /cores
+ sudo bash -c 'echo "/cores/coredump" > /proc/sys/kernel/core_pattern'
+
+ ulimit -c unlimited
+
meson test -C build/ -v
env:
CC: gcc
+ - name: Upload core if something went wrong
+ uses: actions/upload-artifact@v3
+ if: ${{ failure() }}
+ with:
+ name: cores
+ path: /cores
+ - name: Try to show a stack trace if something went wrong
+ if: ${{ failure() }}
+ run: |
+ if [[ -f /cores/coredump ]]; then
+ ERROREXEC=`gdb -c /cores/coredump -batch -ex bt | grep "Core was generated by " | sed "s|Core was generated by \`||" | sed "s|'.||"`
+ echo "::group::There is a core dump file. The backtrace shows:"
+ gdb ${ERROREXEC} -c coredump -batch -ex bt
+ echo "::endgroup::"
+ fi
- uses: actions/upload-artifact@v1
if: failure()
with: