Fix cross-platform unit test failures #6770
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Example tests | |
| on: | |
| push: | |
| branches: ["pull-request/[0-9]+"] | |
| # NOTE: paths cannot be used since push happens to copied PR and only latest commit to PR is used | |
| schedule: | |
| - cron: "0 0 * * *" # Nightly | |
| workflow_dispatch: | |
| # On-demand | |
| concurrency: | |
| # Cancel previous runs if new commit is pushed to the same PR | |
| group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| pr-gate: | |
| uses: ./.github/workflows/_pr_gate.yml | |
| permissions: | |
| checks: read | |
| secrets: inherit | |
| with: | |
| files: | | |
| .github/workflows/_pr_gate.yml | |
| .github/workflows/example_tests.yml | |
| examples/** | |
| modelopt/** | |
| pyproject.toml | |
| tests/examples/** | |
| skip_puzzletron_only: true | |
| ##### PyTorch Example Tests (speculative_decoding requires 26.01 image) ##### | |
| torch: | |
| needs: [pr-gate] | |
| if: needs.pr-gate.outputs.run_tests == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: [gpt-oss, llm_distill, llm_qat, llm_sparsity, specdec_bench] | |
| include: | |
| - example: speculative_decoding | |
| docker_image: "26.01" | |
| uses: ./.github/workflows/_example_tests_runner.yml | |
| secrets: inherit | |
| with: | |
| docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.05' }}-py3" | |
| example: ${{ matrix.example }} | |
| timeout_minutes: 30 | |
| pip_install_extras: "[hf,dev-test]" | |
| runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }} | |
| ##### TensorRT-LLM Example Tests (pr/non-pr split: non-pr runs extra autodeploy+eval examples) ##### | |
| trtllm-pr: | |
| needs: [pr-gate] | |
| if: startsWith(github.ref, 'refs/heads/pull-request/') && needs.pr-gate.outputs.run_tests == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: [llm_ptq, vlm_ptq] | |
| uses: ./.github/workflows/_example_tests_runner.yml | |
| secrets: inherit | |
| with: | |
| docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc17" | |
| example: ${{ matrix.example }} | |
| pip_install_extras: "[hf,dev-test]" | |
| runner: linux-amd64-gpu-rtxpro6000-latest-1 | |
| trtllm-non-pr: | |
| if: ${{ !startsWith(github.ref, 'refs/heads/pull-request/') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: [llm_autodeploy, llm_eval, llm_ptq, vlm_ptq] | |
| uses: ./.github/workflows/_example_tests_runner.yml | |
| secrets: inherit | |
| with: | |
| docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc17" | |
| example: ${{ matrix.example }} | |
| pip_install_extras: "[hf,dev-test]" | |
| runner: linux-amd64-gpu-rtxpro6000-latest-2 | |
| ##### Megatron Example Tests ##### | |
| megatron: | |
| needs: [pr-gate] | |
| if: needs.pr-gate.outputs.run_tests == 'true' | |
| uses: ./.github/workflows/_example_tests_runner.yml | |
| secrets: inherit | |
| with: | |
| docker_image: "nvcr.io/nvidia/nemo:26.04" | |
| example: megatron_bridge | |
| timeout_minutes: 45 | |
| pip_install_extras: "[hf,puzzletron,dev-test]" | |
| runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }} | |
| ##### ONNX/TensorRT Example Tests ##### | |
| onnx: | |
| needs: [pr-gate] | |
| if: needs.pr-gate.outputs.run_tests == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: [diffusers, torch_onnx] | |
| uses: ./.github/workflows/_example_tests_runner.yml | |
| secrets: inherit | |
| with: | |
| docker_image: "nvcr.io/nvidia/tensorrt:26.05-py3" | |
| example: ${{ matrix.example }} | |
| timeout_minutes: 45 | |
| pip_install_extras: "[onnx,hf,dev-test]" | |
| runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }} | |
| ##### Required Check for PR ##### | |
| example-pr-required-check: | |
| # Run even if example tests are skipped | |
| if: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && always() }} | |
| needs: [pr-gate, torch, trtllm-pr, megatron, onnx] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Report intentionally scoped example tests | |
| if: needs.pr-gate.outputs.puzzletron_only == 'true' | |
| run: | | |
| echo "## Generic example tests were not required" >> "$GITHUB_STEP_SUMMARY" | |
| echo >> "$GITHUB_STEP_SUMMARY" | |
| echo "This pull request targets \`feature/puzzletron_v2\`, and its test-relevant changes are limited to Puzzletron-scoped paths." >> "$GITHUB_STEP_SUMMARY" | |
| echo "The standalone Puzzletron v2 CPU check remains required." >> "$GITHUB_STEP_SUMMARY" | |
| - name: Required example tests did not succeed | |
| if: | | |
| needs.pr-gate.result != 'success' || | |
| (needs.pr-gate.outputs.run_tests == 'true' && ( | |
| needs.torch.result != 'success' || | |
| needs.trtllm-pr.result != 'success' || | |
| needs.megatron.result != 'success' || | |
| needs.onnx.result != 'success' | |
| )) | |
| run: exit 1 |