Skip to content

Commit

Permalink
Upload core files as artifacts on Linux when crashes happen in the "T…
Browse files Browse the repository at this point in the history
…est Suites - Linux" test. (#7652)
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jun 15, 2021
1 parent e0431bd commit 1291093
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- name: Try to ensure the directories for core dumping exist and we can write them.
run: |
apt-get update
apt-get -y install --fix-missing rsync
mkdir /tmp/cores || true
sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true
mkdir objdir-clone || true
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand All @@ -57,11 +64,32 @@ jobs:
timeout-minutes: 5
run: |
scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/
- name: Copy objdir
run: |
# The idea is to not upload our objdir unless builds have
# actually succeeded, because that just wastes space.
rsync -a out/debug/standalone/ objdir-clone || true
- name: Run Tests
timeout-minutes: 5
run: |
ifconfig -a
scripts/tests/test_suites.sh
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-core-linux
path: /tmp/cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-objdir-linux
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
test_suites_darwin:
name: Test Suites - Darwin
timeout-minutes: 60
Expand Down Expand Up @@ -122,21 +150,21 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-core
name: crash-core-darwin
path: /cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-log
name: crash-log-darwin
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-objdir
name: crash-objdir-darwin
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5

0 comments on commit 1291093

Please sign in to comment.