Skip to content

Test only(Do not review): one main workflow, if fast feed back loop is success then trigger all other workflows #3558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 27 commits into
base: lluo/add_fail_fast
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/build-test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Lan test workflow main

on:
pull_request:
push:
branches:
- main
- nightly
- release/*
tags:
# NOTE: Binary build pipelines should only get triggered on release candidate builds
# Release candidate tags look like: v1.11.0-rc1
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

permissions:
id-token: write
contents: read
packages: write

jobs:
trigger-fail-fast-test:
strategy:
fail-fast: false
permissions:
id-token: write
contents: read
packages: write
uses: ./.github/workflows/build-test-linux-x86_64.yml
with:
run-fail-fast-test-set: true

trigger-linux-test:
needs: [trigger-fail-fast-test]
strategy:
fail-fast: false
name: build-test on linux-x86_64
permissions:
id-token: write
contents: read
packages: write
uses: ./.github/workflows/build-test-linux-x86_64.yml
with:
run-fail-fast-test-set: false
job-name: trigger-linux-test

trigger-windows-test:
needs: [trigger-fail-fast-test]
strategy:
fail-fast: false
name: build-test on windows
permissions:
id-token: write
contents: read
packages: write
uses: ./.github/workflows/build-test-windows.yml
with:
job-name: trigger-windows-test

wait-all-jobs:
needs: [trigger-linux-test, trigger-windows-test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Wait for all jobs to complete
run: |
echo "Waiting for all jobs to complete..."

concurrency:
group: ${{ github.workflow }}-all-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
cancel-in-progress: true
5 changes: 3 additions & 2 deletions .github/workflows/build-test-linux-aarch64-jetpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

jobs:
generate-matrix:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
Expand All @@ -46,7 +46,8 @@ jobs:
env:
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }}
run: |
set -eou pipefail
set -x
echo '${{ github.event.workflow_run.conclusion }}'
echo "LIMIT_PR_BUILDS=${LIMIT_PR_BUILDS}"
echo '${{ github.event_name }}'
echo '${{ github.event.ref}}'
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-test-linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Build and test Linux aarch64 wheels

on:
#pull_request:
workflow_run:
workflows: ["Build and test Linux x86_64 wheels"]
types:
- completed
push:
branches:
- main
Expand Down
Loading