Skip to content

Commit

Permalink
Upload cores dumped in build-and-test CI
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <[email protected]>
  • Loading branch information
pguyot committed Jan 16, 2025
1 parent 13b327d commit 6c9dfcd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,60 +367,69 @@ jobs:
timeout-minutes: 15
working-directory: build
run: |
ulimit -c unlimited
./tests/test-erlang -s prime_smp
valgrind ./tests/test-erlang -s prime_smp
- name: "Test: test-enif"
working-directory: build
run: |
ulimit -c unlimited
./tests/test-enif
valgrind ./tests/test-enif
- name: "Test: test-mailbox"
working-directory: build
run: |
ulimit -c unlimited
./tests/test-mailbox
valgrind ./tests/test-mailbox
- name: "Test: test-structs"
timeout-minutes: 10
working-directory: build
run: |
ulimit -c unlimited
./tests/test-structs
valgrind ./tests/test-structs
- name: "Test: test_etest.avm"
timeout-minutes: 5
working-directory: build
run: |
ulimit -c unlimited
./src/AtomVM ./tests/libs/etest/test_etest.avm
valgrind ./src/AtomVM ./tests/libs/etest/test_etest.avm
- name: "Test: test_estdlib.avm"
timeout-minutes: 5
working-directory: build
run: |
ulimit -c unlimited
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
valgrind ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
- name: "Test: test_eavmlib.avm"
timeout-minutes: 10
working-directory: build
run: |
ulimit -c unlimited
./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
valgrind ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
- name: "Test: test_alisp.avm"
timeout-minutes: 10
working-directory: build
run: |
ulimit -c unlimited
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
valgrind ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
- name: "Test: Tests.avm (Elixir)"
timeout-minutes: 10
working-directory: build
run: |
ulimit -c unlimited
if command -v elixirc &> /dev/null
then
./src/AtomVM ./tests/libs/exavmlib/Tests.avm
Expand All @@ -430,7 +439,40 @@ jobs:
- name: "Install and smoke test"
working-directory: build
run: |
ulimit -c unlimited
sudo PATH=${PATH} make install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h
- name: "Run coredumpctl info"
if: ${{ failure() }}
run: |
# Wait until systemd-coredump finished
while ps x | grep -cE 'systemd-[c]oredump'; do
echo systemd-coredump is still running
sleep 1
done
# info works on all versions of ubuntu
coredumpctl info || true
# The following only works on recent versions of ubuntu
coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'" || true
coredumpctl debug --debugger-arguments="-batch -ex 'info threads'" || true
coredumpctl debug --debugger-arguments="-batch -ex 'thread apply all bt full'" || true
coredumpctl debug --debugger-arguments='-batch -ex "display /10i $pc"' || true
coredumpctl dump -o core.dump || true
if [ -e core.dump ]; then
mkdir core
mv core.dump core/
cp build/src/AtomVM core/
cp build/tests/test-* core/
fi
- name: "Upload any dumped core"
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: core-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.otp }}-${{ github.run_id }}-${{ github.run_attempt }}
path: |
core/*
retention-days: 5

0 comments on commit 6c9dfcd

Please sign in to comment.