Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the "Test Suites" job fails on Darwin, upload core and object files as artifacts. #7531

Merged
Merged
Show file tree
Hide file tree
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
34 changes: 33 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Tests
on:
push:
pull_request:
workflow_dispatch:

jobs:
test_suites_linux:
Expand Down Expand Up @@ -75,6 +76,11 @@ jobs:
submodules: true
- name: Setup Environment
run: brew install openssl pkg-config
- name: Try to ensure the directories for core dumping and diagnostic log collection exist and we can write them.
run: |
sudo chown ${USER} /cores || true
mkdir -p ~/Library/Logs/DiagnosticReports || true
mkdir objdir-clone || true
- name: Fix pkgconfig link
working-directory: /usr/local/lib/pkgconfig
run: |
Expand Down Expand Up @@ -102,8 +108,34 @@ 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 Test Suites
timeout-minutes: 5
run: |
scripts/tests/test_suites.sh

- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-core
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
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: crash-objdir
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5
2 changes: 2 additions & 0 deletions scripts/tests/test_suites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ done
echo ""
echo ""

ulimit -c unlimited || true

declare -a iter_array="($(seq "$iterations"))"
for j in "${iter_array[@]}"; do
echo " ===== Iteration $j starting"
Expand Down