Skip to content

Commit

Permalink
ci: Tmate interactive session in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamScience committed May 29, 2024
1 parent bf68cc2 commit b888e42
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/fe5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ defaults:

# Controls when the workflow will run
on:
push
push:
branches:
- master
- ci
- 'bugfix*'
- 'releases/**'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Tmate debugging session'
required: false
default: false

jobs:
build:
Expand All @@ -24,6 +36,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
detached: true

- name: Compile and Test
run: |
source /opt/foam-extend-5.0/etc/bashrc
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/of2206.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
detached: true

- name: Compile and Test
run: |
source /usr/lib/openfoam/openfoam2206/etc/bashrc
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/of9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
detached: true

- name: Compile and Test
run: |
source /opt/openfoam9/etc/bashrc
Expand Down
7 changes: 1 addition & 6 deletions Alltest
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ parallelTests(){
esac
done
nProcs=$(grep -oP "numberOfSubdomains\s+\K\d+" "${3}"/system/decomposeParDict)
if ! command -v my_command &> /dev/null; then
echo "decomposePar not found, assuming case already decoposed..." >&2
for i in $(seq 0 $(($nProcs - 1))); do mkdir -p "{3}/processor$i"; done
else
decomposePar -force -case "${3}" > "${3}/log.decomposePar"
fi
decomposePar -force -case "${3}" > "${3}/log.decomposePar"
err=$((err + $?))
# run the case in parallel mode
report=""
Expand Down

0 comments on commit b888e42

Please sign in to comment.