Skip to content

Commit cd29eab

Browse files
committed
Add NGC release test workflow
1 parent b8a121a commit cd29eab

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: ~NGC release testing
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
JAX_IMAGE:
7+
type: string
8+
description: "JAX image to run tests on"
9+
required: false
10+
default: ''
11+
MAXTEXT_IMAGE:
12+
type: string
13+
description: "MaxText image to run tests on"
14+
required: false
15+
default: ''
16+
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
21+
permissions:
22+
contents: read # to fetch code
23+
actions: write # to cancel previous workflows
24+
packages: write # to upload container
25+
26+
jobs:
27+
test-nccl:
28+
if: inputs.JAX_IMAGE != ''
29+
uses: ./.github/workflows/_test_nccl.yaml
30+
with:
31+
CONTAINER: ${{ inputs.JAX_IMAGE }}
32+
secrets: inherit
33+
34+
test-jax:
35+
if: inputs.JAX_IMAGE != ''
36+
uses: ./.github/workflows/_test_unit.yaml
37+
with:
38+
TEST_NAME: jax
39+
EXECUTE: |
40+
docker run -i --shm-size=1g --gpus all \
41+
${{ inputs.JAX_IMAGE }} \
42+
bash <<"EOF" |& tee test-backend-independent.log
43+
test-jax.sh -b backend-independent
44+
EOF
45+
docker run -i --shm-size=1g --gpus all \
46+
${{ inputs.JAX_IMAGE }} \
47+
bash <<"EOF" |& tee tee test-gpu.log
48+
test-jax.sh -b gpu
49+
EOF
50+
STATISTICS_SCRIPT: |
51+
errors=$(cat test-*.log | grep -c 'ERROR:' || true)
52+
failed_tests=$(cat test-*.log | grep -c 'FAILED in' || true)
53+
passed_tests=$(cat test-*.log | grep -c 'PASSED in' || true)
54+
total_tests=$((failed_tests + passed_tests))
55+
echo "TOTAL_TESTS=${total_tests}" >> $GITHUB_OUTPUT
56+
echo "ERRORS=${errors}" >> $GITHUB_OUTPUT
57+
echo "PASSED_TESTS=${passed_tests}" >> $GITHUB_OUTPUT
58+
echo "FAILED_TESTS=${failed_tests}" >> $GITHUB_OUTPUT
59+
ARTIFACTS: |
60+
test-backend-independent.log
61+
test-gpu.log
62+
secrets: inherit
63+
64+
test-maxtext:
65+
if: inputs.MAXTEXT_IMAGE != ''
66+
uses: ./.github/workflows/_test_maxtext.yaml
67+
with:
68+
MAXTEXT_IMAGE: ${{ inputs.MAXTEXT_IMAGE }}
69+
secrets: inherit
70+
71+
test-maxtext-eks:
72+
if: inputs.MAXTEXT_IMAGE != ''
73+
uses: ./.github/workflows/_test_maxtext_k8s.yaml
74+
with:
75+
MAXTEXT_IMAGE: ${{ inputs.MAXTEXT_IMAGE }}
76+
secrets: inherit
77+
78+
finalize:
79+
needs: [ test-nccl, test-jax, test-maxtext, test-maxtext-eks ]
80+
if: "!cancelled()"
81+
uses: ./.github/workflows/_finalize.yaml
82+
secrets: inherit

0 commit comments

Comments
 (0)