Skip to content

Commit 31b71c0

Browse files
authored
ci: Skip for deployment jobs (#308)
Signed-off-by: oliver könig <okoenig@nvidia.com>
1 parent 179ea11 commit 31b71c0

File tree

5 files changed

+125
-11
lines changed

5 files changed

+125
-11
lines changed

.github/workflows/build-docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,29 @@ on:
1919
branches:
2020
- main
2121
- "pull-request/[0-9]+"
22+
- "deploy-release/*"
2223

2324
jobs:
25+
pre-flight:
26+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.53.0
27+
2428
build-docs:
29+
needs: [pre-flight]
30+
if: |
31+
!(needs.pre-flight.outputs.docs_only == 'true'
32+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
2533
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.48.0
34+
35+
build-docs-summary:
36+
needs: [pre-flight, build-docs]
37+
if: |
38+
(
39+
needs.pre-flight.outputs.docs_only == 'true'
40+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
41+
|| success()
42+
)
43+
&& !cancelled()
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Result
47+
run: echo Build docs successful

.github/workflows/build-test-publish-wheel.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,21 @@ on:
2020
- main
2121
- "r**"
2222
- "pull-request/**"
23+
- "deploy-release/*"
2324

2425
defaults:
2526
run:
2627
shell: bash -x -e -u -o pipefail {0}
2728

2829
jobs:
30+
pre-flight:
31+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.53.0
32+
2933
build-test-publish-wheel:
34+
needs: [pre-flight]
35+
if: |
36+
!(needs.pre-flight.outputs.docs_only == 'true'
37+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
3038
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_test_publish_wheel.yml@v0.38.0
3139
with:
3240
dry-run: true
@@ -40,3 +48,17 @@ jobs:
4048
SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASE_ENDPOINT }}
4149
SLACK_WEBHOOK_ADMIN: ${{ secrets.SLACK_WEBHOOK_ADMIN }}
4250
GH_TOKEN: ${{ secrets.PAT }}
51+
52+
build-test-publish-wheel-summary:
53+
needs: [pre-flight, build-test-publish-wheel]
54+
if: |
55+
(
56+
needs.pre-flight.outputs.docs_only == 'true'
57+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
58+
|| success()
59+
)
60+
&& !cancelled()
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Result
64+
run: echo Build test publish wheel successful

.github/workflows/cicd-main.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
branches:
2020
- main
2121
- "pull-request/[0-9]+"
22+
- "deploy-release/*"
2223

2324
concurrency:
2425
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event.label.name || 'main' }}-${{ github.event_name }}
@@ -30,10 +31,15 @@ permissions:
3031

3132
jobs:
3233
pre-flight:
33-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.45.0
34+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.53.0
3435

3536
linting:
3637
runs-on: ubuntu-latest
38+
needs: [pre-flight]
39+
if: |
40+
!(needs.pre-flight.outputs.is_ci_workload == 'true'
41+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
42+
|| needs.pre-flight.outputs.docs_only == 'true')
3743
steps:
3844
- name: Checkout
3945
uses: actions/checkout@v4
@@ -56,6 +62,7 @@ jobs:
5662
environment: test
5763
if: |
5864
!(needs.pre-flight.outputs.is_ci_workload == 'true'
65+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
5966
|| needs.pre-flight.outputs.docs_only == 'true')
6067
steps:
6168
- name: Running CI tests
@@ -245,6 +252,7 @@ jobs:
245252
if: |
246253
(
247254
needs.pre-flight.outputs.docs_only == 'true'
255+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
248256
|| success()
249257
)
250258
&& !cancelled()
@@ -340,18 +348,27 @@ jobs:
340348
exit 1
341349
fi
342350
351+
coverage-placeholder:
352+
needs: [pre-flight, Nemo_CICD_Test]
353+
name: codecov/patch
354+
if: |
355+
(needs.pre-flight.outputs.docs_only == 'true'
356+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
357+
&& !failure()
358+
&& !cancelled()
359+
runs-on: ubuntu-latest
360+
steps:
361+
- name: Dummy placeholder
362+
run: echo "noop"
363+
343364
Coverage:
344365
runs-on: ubuntu-latest
345366
needs: [pre-flight, Nemo_CICD_Test]
346367
if: |
347-
needs.pre-flight.outputs.test_to_run != '[]'
348-
&& needs.pre-flight.outputs.components_to_run != '[]'
349-
&& (
350-
success()
351-
|| (
352-
needs.cicd-wait-in-queue.result == 'skipped'
353-
&& needs.pre-flight.outputs.is_ci_workload == 'true'
354-
)
368+
(
369+
needs.pre-flight.outputs.docs_only == 'false'
370+
&& needs.pre-flight.outputs.is_deployment_workflow == 'false'
371+
&& success()
355372
)
356373
&& !cancelled()
357374
strategy:

.github/workflows/copyright-check.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,33 @@
1515
name: Copyright check
1616

1717
on:
18-
pull_request:
18+
push:
19+
branches:
20+
- main
21+
- "pull-request/[0-9]+"
22+
- "deploy-release/*"
1923

2024
jobs:
25+
pre-flight:
26+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.53.0
27+
2128
copyright-check:
29+
needs: [pre-flight]
30+
if: |
31+
!(needs.pre-flight.outputs.docs_only == 'true'
32+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
2233
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_copyright_check.yml@v0.2.0
34+
35+
copyright-check-summary:
36+
needs: [pre-flight, copyright-check]
37+
if: |
38+
(
39+
needs.pre-flight.outputs.docs_only == 'true'
40+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
41+
|| success()
42+
)
43+
&& !cancelled()
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Result
47+
run: echo Copyright check successful

.github/workflows/install-test.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,20 @@ on:
2222
branches:
2323
- main
2424
- "pull-request/[0-9]+"
25+
- "deploy-release/*"
26+
2527
env:
2628
UV_PROJECT_ENVIRONMENT: "./venv"
2729

2830
jobs:
31+
pre-flight:
32+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.53.0
33+
2934
pip-test-no-cuda:
35+
needs: [pre-flight]
36+
if: |
37+
!(needs.pre-flight.outputs.docs_only == 'true'
38+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
3039
runs-on: ${{ matrix.arch }}
3140
name: Pip - Python${{ matrix.python-version }} - ${{ matrix.arch == 'ubuntu-latest' && 'AMD64/Linux' || (matrix.arch == 'ubuntu-24.04-arm' && 'ARM64/Linux' || 'ARM64/Darwin') }} - No CUDA
3241
strategy:
@@ -80,6 +89,10 @@ jobs:
8089
python-binary: ./venv/bin/python
8190

8291
pip-test-cuda:
92+
needs: [pre-flight]
93+
if: |
94+
!(needs.pre-flight.outputs.docs_only == 'true'
95+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
8396
runs-on: linux-amd64-cpu16
8497
name: Pip - Python${{ matrix.python-version }}${{ matrix.extra-groups != '' && format('[{0}]', matrix.extra-groups) || '' }} - AMD64/Linux - NGC CUDA
8598
container:
@@ -140,6 +153,10 @@ jobs:
140153
python-binary: ./venv/bin/python
141154

142155
uv-test-cuda:
156+
needs: [pre-flight]
157+
if: |
158+
!(needs.pre-flight.outputs.docs_only == 'true'
159+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
143160
runs-on: linux-amd64-cpu16
144161
name: UV - AMD64/Linux - NGC ${{ contains(matrix.image, 'cuda') && 'CUDA' || 'PyTorch' }}
145162
container:
@@ -196,6 +213,10 @@ jobs:
196213
python-binary: /opt/venv/bin/python
197214

198215
uv-test-no-cuda:
216+
needs: [pre-flight]
217+
if: |
218+
!(needs.pre-flight.outputs.docs_only == 'true'
219+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
199220
runs-on: ${{ matrix.arch }}
200221
name: UV - Python ${{ matrix.python-version }} - ${{ matrix.arch == 'ubuntu-latest' && 'AMD64/Linux' || 'ARM64/Darwin' }} - No CUDA
201222
environment: nemo-ci
@@ -254,9 +275,16 @@ jobs:
254275
python-binary: ./venv/bin/python
255276

256277
install-test-summary:
257-
needs: [pip-test-no-cuda, uv-test-cuda, pip-test-cuda, uv-test-no-cuda]
278+
needs: [pre-flight, pip-test-no-cuda, uv-test-cuda, pip-test-cuda, uv-test-no-cuda]
258279
runs-on: ubuntu-latest
259280
name: Install test summary
281+
if: |
282+
(
283+
needs.pre-flight.outputs.docs_only == 'true'
284+
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
285+
|| success()
286+
)
287+
&& !cancelled()
260288
steps:
261289
- name: Result
262290
run: echo Install check successful

0 commit comments

Comments
 (0)