mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Adding tmate action to CI for debugging (#3138)
This commit is contained in:
parent
e9ddf885e7
commit
18c3112415
2 changed files with 43 additions and 1 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
|
@ -88,6 +88,8 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
|
|
@ -98,7 +100,17 @@ jobs:
|
|||
run: |
|
||||
echo "OPENMC_CROSS_SECTIONS=$HOME/nndc_hdf5/cross_sections.xml" >> $GITHUB_ENV
|
||||
echo "OPENMC_ENDF_DATA=$HOME/endf-b-vii.1" >> $GITHUB_ENV
|
||||
|
||||
# get the sha of the last branch commit
|
||||
# for push and workflow_dispatch events, use the current reference head
|
||||
BRANCH_SHA=HEAD
|
||||
# for a pull_request event, use the last reference of the parents of the merge commit
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
BRANCH_SHA=$(git rev-list --parents -n 1 HEAD | rev | cut -d" " -f 1 | rev)
|
||||
fi
|
||||
COMMIT_MESSAGE=$(git log $BRANCH_SHA -1 --pretty=%B)
|
||||
echo ${COMMIT_MESSAGE}
|
||||
echo "COMMIT_MESSAGE=${COMMIT_MESSAGE}" >> $GITHUB_ENV
|
||||
|
||||
- name: Apt dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
@ -153,6 +165,12 @@ jobs:
|
|||
CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/
|
||||
$GITHUB_WORKSPACE/tools/ci/gha-script.sh
|
||||
|
||||
- name: Setup tmate debug session
|
||||
continue-on-error: true
|
||||
if: ${{ contains(env.COMMIT_MESSAGE, '[gha-debug]') }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: after_success
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue