Skip to content

Commit 68ecc33

Browse files
committed
Merge branch 'lluo/test_workflow_run' of github.com:pytorch/TensorRT into lluo/test_workflow_run
2 parents e66c53f + 94bfebe commit 68ecc33

File tree

7 files changed

+53
-18
lines changed

7 files changed

+53
-18
lines changed

.github/workflows/build-test-all.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
uses: ./.github/workflows/build-test-linux-x86_64.yml
2828
with:
2929
fail-fast: true
30-
30+
3131
trigger-linux-test:
32-
needs: [trigger-fail-fast-test]
32+
needs: [fail-fast-test]
33+
strategy:
34+
fail-fast: false
3335
if: always()
36+
name: build-test on linux-x86_64
3437
permissions:
3538
id-token: write
3639
contents: read
@@ -40,6 +43,7 @@ jobs:
4043
trigger-windows-test:
4144
needs: [trigger-fail-fast-test]
4245
if: always()
46+
name: build-test on windows
4347
permissions:
4448
id-token: write
4549
contents: read
@@ -49,6 +53,8 @@ jobs:
4953
wait-all-jobs:
5054
needs: [trigger-linux-test, trigger-windows-test]
5155
runs-on: ubuntu-latest
56+
strategy:
57+
fail-fast: false
5258
steps:
5359
- name: Wait for all jobs to complete
5460
run: |

.github/workflows/build-test-linux-x86_64.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
workflow_dispatch:
2020

2121
jobs:
22-
generate-matrix:
22+
generate-linux-x86_64-matrix:
2323
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2424
with:
2525
package-type: wheel
@@ -30,7 +30,7 @@ jobs:
3030
with-cpu: false
3131

3232
filter-matrix:
33-
needs: [generate-matrix]
33+
needs: [generate-linux-x86_64-matrix]
3434
outputs:
3535
matrix: ${{ steps.generate.outputs.matrix }}
3636
runs-on: ubuntu-latest
@@ -45,9 +45,10 @@ jobs:
4545
id: generate
4646
run: |
4747
set -eou pipefail
48-
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
48+
MATRIX_BLOB=${{ toJSON(needs.generate-linux-x86_64-matrix.outputs.matrix) }}
4949
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}")"
5050
echo "${MATRIX_BLOB}"
51+
echo "${{ github.workflow }}-linux-x86_64-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}"
5152
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
5253
5354
build:

.github/workflows/build-test-windows.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
workflow_dispatch:
1616

1717
jobs:
18-
generate-matrix:
19-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
18+
generate-windows-matrix:
19+
name: generate-windows-matrix
2020
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2121
with:
2222
package-type: wheel
@@ -27,7 +27,7 @@ jobs:
2727
with-cpu: false
2828

2929
filter-matrix:
30-
needs: [generate-matrix]
30+
needs: [generate-windows-matrix]
3131
outputs:
3232
matrix: ${{ steps.generate.outputs.matrix }}
3333
runs-on: ubuntu-latest
@@ -42,7 +42,8 @@ jobs:
4242
id: generate
4343
run: |
4444
set -eou pipefail
45-
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
45+
echo "${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}"
46+
MATRIX_BLOB=${{ toJSON(needs.generate-windows-matrix.outputs.matrix) }}
4647
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}")"
4748
echo "${MATRIX_BLOB}"
4849
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
@@ -322,4 +323,4 @@ jobs:
322323

323324
concurrency:
324325
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
325-
cancel-in-progress: false
326+
cancel-in-progress: true

.github/workflows/test_a.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ jobs:
1212
echo "Pre-test"
1313
echo "${{ github.workflow }}-a-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}"
1414
15-
call-b:
15+
call-linux-x86_64:
16+
needs: pre-test
1617
uses: ./.github/workflows/test_b.yml
1718

18-
call-c:
19+
call-windows:
20+
needs: pre-test
1921
uses: ./.github/workflows/test_c.yml
2022

2123
wait-all-jobs:
22-
needs: [call-b, call-c]
24+
needs: [call-linux-x86_64, call-windows]
2325
runs-on: ubuntu-latest
2426
steps:
2527
- name: Wait for all jobs to complete
2628
run: |
27-
echo "Waiting for all jobs to complete..."
29+
echo "Waiting for all jobs to complete... ${{ github.workflow }} "
2830
2931
concurrency:
3032
group: ${{ github.workflow }}-a-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}

.github/workflows/test_b.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
workflow_call:
55

66
jobs:
7-
test-b:
7+
test:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Test b
1111
run: |
12-
echo "Test b"
12+
echo "Test b ${{ github.workflow }}"
1313
1414
concurrency:
1515
group: ${{ github.workflow }}-b-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}

.github/workflows/test_c.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ name: Lan test c
22

33
on:
44
workflow_call:
5+
inputs:
6+
job-name:
7+
required: false
8+
type: string
9+
default: "test-c"
510

611
jobs:
7-
test-b:
12+
test:
813
runs-on: ubuntu-latest
914
steps:
1015
- name: Test c
1116
run: |
12-
echo "Test c"
17+
echo "Test c ${{ github.workflow }} "
1318
1419
concurrency:
1520
group: ${{ github.workflow }}-c-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}

.github/workflows/test_d.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lan test d
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Lan test a"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Test c
14+
run: |
15+
echo "Test c ${{ github.workflow }} "
16+
echo "Test a github.event.workflow_run.conclusion ${{ github.event.workflow_run.conclusion }}"
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-c-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
20+
cancel-in-progress: true

0 commit comments

Comments
 (0)