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

Add tmate actions to debug GitHub CI failures #776

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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@ name: Build

on:
push:
branches: [development, main]
paths-ignore:
- 'README.md'
- 'INSTALL.md'
- 'docs/**'
pull_request:
branches: [development, main]
paths-ignore:
- 'README.md'
- 'INSTALL.md'
- 'docs/**'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled'
required: false
default: true

jobs:
run:
Expand Down Expand Up @@ -71,6 +80,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup tmate session
uses: mxschmitt/[email protected]
if: ${{ inputs.debug_enabled }}

- name: add oneAPI to apt
if: ${{ matrix.useoneAPI }}
shell: bash
Expand Down Expand Up @@ -172,3 +185,7 @@ jobs:
- name: Upload code coverage
if: ${{ matrix.OCCA_COVERAGE }}
run: bash <(curl --no-buffer -s https://codecov.io/bash) -x "${GCOV}"

- name: Block to allow inspecting failures
run: sleep 1800
if: ${{ failure() && inputs.debug_enabled }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ $ occa info
========+======================+=================================
```

## Debug

### GitHub CI failures

We use [tmate action](https://github.com/mxschmitt/action-tmate) for debugging GitHub CI workflows with a [manually triggered debug](https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug) event.
See [GitHub docs](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow) on how to initiate a manual debug run (make sure to check the `Run the build with tmate debugging enabled` box).

## Community

### Support
Expand Down