Skip to content

Commit

Permalink
workflows enhanced synchronous execution
Browse files Browse the repository at this point in the history
 - handled error states
 - taken into account disabled workflows (disabled_manually state)

[skip ci]
  • Loading branch information
silverqx committed May 4, 2024
1 parent 5b3d202 commit ff31b7a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 8 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/linux-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run vcpkg-linux.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run vcpkg-linux.yml --ref ${{ github.ref_name }}
workflowState=$(gh workflow list --all --json path,state \
--jq '.[] | select (.path | endswith("/vcpkg-linux.yml")) | .state')
if [ $? -eq 0 ] && [[ "$workflowState" == 'active' ]]; then
gh workflow run vcpkg-linux.yml --ref ${{ github.ref_name }}
fi
env:
GH_TOKEN: ${{ github.token }}
10 changes: 9 additions & 1 deletion .github/workflows/msvc2022-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run vcpkg-windows.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run vcpkg-windows.yml --ref ${{ github.ref_name }}
$workflowState = gh workflow list --all --json path,state `
--jq '.[] | select (.path | endswith("/vcpkg-windows.yml")) | .state'
if ($? -and $workflowState -ceq 'active') {
gh workflow run vcpkg-windows.yml --ref ${{ github.ref_name }}
}
env:
GH_TOKEN: ${{ github.token }}
12 changes: 10 additions & 2 deletions .github/workflows/msys2-ucrt64-drivers.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MySQL
riv# MySQL
# ---
# Both use the default unencrypted database connections because maria client can't connect
# to the MySQL >= 8.0.34 or >=8.1, there is some problem in TLS 1.2 and 1.3 connection, it can't
Expand Down Expand Up @@ -272,10 +272,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run linux-qt6-drivers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run linux-qt6-drivers.yml --ref ${{ github.ref_name }}
$workflowState = gh workflow list --all --json path,state `
--jq '.[] | select (.path | endswith("/linux-qt6-drivers.yml")) | .state'
if ($? -and $workflowState -ceq 'active') {
gh workflow run linux-qt6-drivers.yml --ref ${{ github.ref_name }}
}
env:
GH_TOKEN: ${{ github.token }}
10 changes: 9 additions & 1 deletion .github/workflows/vcpkg-linux-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run analyzers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run analyzers.yml --ref ${{ github.ref_name }}
workflowState=$(gh workflow list --all --json path,state \
--jq '.[] | select (.path | endswith("/analyzers.yml")) | .state')
if [ $? -eq 0 ] && [[ "$workflowState" == 'active' ]]; then
gh workflow run analyzers.yml --ref ${{ github.ref_name }}
fi
env:
GH_TOKEN: ${{ github.token }}
10 changes: 9 additions & 1 deletion .github/workflows/vcpkg-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run vcpkg-linux-drivers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run vcpkg-linux-drivers.yml --ref ${{ github.ref_name }}
workflowState=$(gh workflow list --all --json path,state \
--jq '.[] | select (.path | endswith("/vcpkg-linux-drivers.yml")) | .state')
if [ $? -eq 0 ] && [[ "$workflowState" == 'active' ]]; then
gh workflow run vcpkg-linux-drivers.yml --ref ${{ github.ref_name }}
fi
env:
GH_TOKEN: ${{ github.token }}
10 changes: 9 additions & 1 deletion .github/workflows/vcpkg-windows-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run msys2-ucrt64-drivers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run msys2-ucrt64-drivers.yml --ref ${{ github.ref_name }}
$workflowState = gh workflow list --all --json path,state `
--jq '.[] | select (.path | endswith("/msys2-ucrt64-drivers.yml")) | .state'
if ($? -and $workflowState -ceq 'active') {
gh workflow run msys2-ucrt64-drivers.yml --ref ${{ github.ref_name }}
}
env:
GH_TOKEN: ${{ github.token }}
10 changes: 9 additions & 1 deletion .github/workflows/vcpkg-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,18 @@ jobs:
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run vcpkg-windows-drivers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
gh workflow run vcpkg-windows-drivers.yml --ref ${{ github.ref_name }}
$workflowState = gh workflow list --all --json path,state `
--jq '.[] | select (.path | endswith("/vcpkg-windows-drivers.yml")) | .state'
if ($? -and $workflowState -ceq 'active') {
gh workflow run vcpkg-windows-drivers.yml --ref ${{ github.ref_name }}
}
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit ff31b7a

Please sign in to comment.