Skip to content

Commit d282a87

Browse files
authored
ci: Run gputests on main (#741)
* ci: Run gputests on main Signed-off-by: oliver könig <okoenig@nvidia.com> * f Signed-off-by: oliver könig <okoenig@nvidia.com> --------- Signed-off-by: oliver könig <okoenig@nvidia.com>
1 parent fbdf29c commit d282a87

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/gpuci.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ permissions:
1515
contents: read
1616

1717
jobs:
18-
changed-files:
18+
pre-flight:
1919
runs-on: ubuntu-latest
2020
outputs:
21-
any_changed: ${{ steps.changed-files.outputs.any_changed }}
22-
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
21+
allowed_to_run: ${{ steps.allowed-to-run.outputs.allowed_to_run }}
2322
steps:
2423
- name: Checkout repository
2524
uses: actions/checkout@v4
@@ -49,11 +48,21 @@ jobs:
4948
tests/**
5049
base_sha: ${{ steps.base-ref.outputs.base }}
5150

51+
- name: Is main branch
52+
id: is-main-branch
53+
run: |
54+
echo "is_main_branch=${{ github.ref == 'refs/heads/main' }}" >> $GITHUB_OUTPUT
55+
56+
- name: Allowed to run
57+
id: allowed-to-run
58+
run: |
59+
echo "allowed_to_run=${{ steps.changed-files.outputs.any_changed == 'true' || steps.changed-files.outputs.is_main_branch == 'true' }}" >> $GITHUB_OUTPUT
60+
5261
# First, we build and push a NeMo Curator container
5362
build-container:
63+
needs: [pre-flight]
64+
if: ${{ needs.pre-flight.outputs.allowed_to_run == 'true' }}
5465
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_container.yml@v0.35.0
55-
needs: [changed-files]
56-
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
5766
with:
5867
image-name: nemo_curator_container
5968
dockerfile: Dockerfile
@@ -74,9 +83,9 @@ jobs:
7483

7584
# Then, we run our PyTests in the container we just built
7685
run-gpu-tests:
77-
needs: [build-container]
78-
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
79-
runs-on: linux-amd64-gpu-rtxa6000-latest-2-nemo
86+
needs: [pre-flight, build-container]
87+
if: ${{ needs.pre-flight.outputs.allowed_to_run == 'true' }}
88+
runs-on: linux-amd64-gpu-rtxa6000-latest-1
8089
environment: nemo-ci
8190
# Unit tests should not take longer than 40 minutes including docker pull and startup time
8291
timeout-minutes: 40

0 commit comments

Comments
 (0)