File tree Expand file tree Collapse file tree 3 files changed +50
-4
lines changed
Expand file tree Collapse file tree 3 files changed +50
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,14 @@ defaults:
2525 shell : bash -x -e -u -o pipefail {0}
2626
2727jobs :
28+ pre-flight :
29+ uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 30+
2831 build-test-publish-wheel :
32+ needs : [pre-flight]
33+ if : |
34+ ${{ vars.BUILD_TEST_PUBLISH_WHEEL == 'true' && !(needs.pre-flight.outputs.docs_only == 'true') }}
2935 uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 30- if : ${{ vars.BUILD_TEST_PUBLISH_WHEEL == 'true' }}
3136 with :
3237 dry-run : true
3338 python-package : dfm
Original file line number Diff line number Diff line change @@ -32,17 +32,23 @@ permissions:
3232
3333jobs :
3434
35+ pre-flight :
36+ uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 37+
3538 cicd-wait-in-queue :
39+ needs : [pre-flight]
3640 runs-on : ubuntu-latest
3741 environment : test
42+ if : |
43+ !(needs.pre-flight.outputs.docs_only == 'true')
3844 steps :
3945 - name : Running CI tests
4046 run : |
4147 echo "Running CI tests"
4248
4349 cicd-container-build :
4450 uses : ./.github/workflows/_build_container.yml
45- needs : cicd-wait-in-queue
51+ needs : [ cicd-wait-in-queue, pre-flight]
4652 with :
4753 image-name : dfm
4854 dockerfile : docker/Dockerfile.ci
6369 - script : L0_Unit_Tests_CPU
6470 runner : linux-amd64-cpu16
6571 cpu-only : true
66- needs : [cicd-container-build]
72+ needs : [cicd-container-build, pre-flight]
73+ if : |
74+ !(needs.pre-flight.outputs.docs_only == 'true')
6775 runs-on : ${{ matrix.runner }}
6876 name : ${{ matrix.script }}
6977 environment : nemo-ci
97105 - script : L2_Automodel_Wan21_Test
98106 runner : self-hosted-nemo
99107 timeout : 30
100- needs : [cicd-unit-tests]
108+ needs : [cicd-unit-tests, pre-flight]
109+ if : |
110+ !(needs.pre-flight.outputs.docs_only == 'true')
101111 runs-on : ${{ matrix.runner }}
102112 name : ${{ matrix.is_optional && 'PLEASEFIXME_' || '' }}${{ matrix.script }}
103113 environment : nemo-ci
@@ -124,6 +134,7 @@ jobs:
124134 - cicd-container-build
125135 - cicd-unit-tests
126136 - cicd-e2e-tests
137+ - pre-flight
127138 if : always()
128139 runs-on : ubuntu-latest
129140 permissions : write-all
Original file line number Diff line number Diff line change 1818 pull_request :
1919
2020jobs :
21+ pre-flight :
22+ uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 23+
2124 copyright-check :
25+ needs : [pre-flight]
26+ if : |
27+ !(needs.pre-flight.outputs.docs_only == 'true')
2228 uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 29+
30+ copyright-check-summary :
31+ needs : [pre-flight, copyright-check]
32+ if : |
33+ (
34+ needs.pre-flight.outputs.docs_only == 'true'
35+ || always()
36+ )
37+ && !cancelled()
38+ runs-on : ubuntu-latest
39+ steps :
40+ - name : Result
41+ run : |
42+ FAILED_JOBS=$(gh run view $GITHUB_RUN_ID --json jobs --jq '[.jobs[] | select(.status == "completed" and .conclusion != "success")] | length') || echo 0
43+
44+ if [ "${FAILED_JOBS:-0}" -eq 0 ] || [ "$SKIPPING_IS_ALLOWED" == "true" ]; then
45+ echo "✅ All previous jobs completed successfully"
46+ exit 0
47+ else
48+ echo "❌ Found $FAILED_JOBS failed job(s)"
49+ # Show which jobs failed
50+ gh run view $GITHUB_RUN_ID --json jobs --jq '.jobs[] | select(.status == "completed" and .conclusion != "success") | .name'
51+ exit 1
52+ fi
You can’t perform that action at this time.
0 commit comments