From b888e421c79f9cd98b9d5af01fe41d1307516437 Mon Sep 17 00:00:00 2001 From: Elwardi Date: Wed, 29 May 2024 16:16:48 +0200 Subject: [PATCH] ci: Tmate interactive session in workflows --- .github/workflows/fe5.yml | 20 +++++++++++++++++++- .github/workflows/of2206.yml | 6 ++++++ .github/workflows/of9.yml | 6 ++++++ Alltest | 7 +------ 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fe5.yml b/.github/workflows/fe5.yml index 7e9d865..00847d8 100644 --- a/.github/workflows/fe5.yml +++ b/.github/workflows/fe5.yml @@ -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: @@ -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 diff --git a/.github/workflows/of2206.yml b/.github/workflows/of2206.yml index c3db704..22fe645 100644 --- a/.github/workflows/of2206.yml +++ b/.github/workflows/of2206.yml @@ -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 diff --git a/.github/workflows/of9.yml b/.github/workflows/of9.yml index c728c71..b42b4ef 100644 --- a/.github/workflows/of9.yml +++ b/.github/workflows/of9.yml @@ -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 diff --git a/Alltest b/Alltest index 113feb9..7ac2539 100755 --- a/Alltest +++ b/Alltest @@ -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=""