Skip to content

PR #1056 · public CPU · merge 3ed32d4a6f65e6221903a6a2b34b8835078f41a1 #535

PR #1056 · public CPU · merge 3ed32d4a6f65e6221903a6a2b34b8835078f41a1

PR #1056 · public CPU · merge 3ed32d4a6f65e6221903a6a2b34b8835078f41a1 #535

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: Community CPU
run-name: >-
PR #${{ github.event.pull_request.number }} · public CPU · merge ${{ github.sha }}
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
permissions: {}
concurrency:
group: community-cpu-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
source-quality:
name: Community CPU / Source quality
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
env:
CI_BASE_REF: ${{ github.sha }}^1
steps:
- name: Check out the exact PR merge
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.12"
- name: Install public CPU quality tools
run: python3 -m pip install --disable-pip-version-check --requirement requirements/community-ci.txt
- name: Run source quality
run: python3 -m tools.community_ci source-quality --base "$CI_BASE_REF"
docs:
name: Community CPU / Docs
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Check out the exact PR merge
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "20"
- name: Install website dependencies
working-directory: website
run: npm ci
- name: Test generated model support inventory
working-directory: website
run: npm run test:model-support
- name: Build production documentation
working-directory: website
env:
SITE_URL: https://nvidia.github.io
BASE_URL: /TensorRT-Model-Connect/
run: npm run build
ownership-impact:
name: Community CPU / Ownership and impact
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
env:
CI_BASE_REF: ${{ github.sha }}^1
outputs:
run_unit_tests: ${{ steps.impact.outputs.run_unit_tests }}
unit_scope: ${{ steps.impact.outputs.unit_scope }}
python_test_targets: ${{ steps.impact.outputs.python_test_targets }}
steps:
- name: Check out the exact PR merge
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.12"
- name: Resolve source ownership and CPU scope
id: impact
run: python3 -m tools.community_ci impact --base "$CI_BASE_REF"
unit:
name: Community CPU / Unit / C++ and Python
if: ${{ !cancelled() }}
needs: ownership-impact
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
steps:
- name: Require successful impact analysis
if: ${{ needs.ownership-impact.result != 'success' }}
env:
IMPACT_RESULT: ${{ needs.ownership-impact.result }}
run: |
echo "::error::Ownership and impact did not succeed: $IMPACT_RESULT"
exit 1
- name: Explain an empty unit scope
if: >-
needs.ownership-impact.result == 'success' &&
needs.ownership-impact.outputs.run_unit_tests != 'true'
run: echo "No source-only C++ or Python unit tests are required for this change."
- name: Check out the exact PR merge
if: >-
needs.ownership-impact.result == 'success' &&
needs.ownership-impact.outputs.run_unit_tests == 'true'
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
if: >-
needs.ownership-impact.result == 'success' &&
needs.ownership-impact.outputs.run_unit_tests == 'true'
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.12"
- name: Run hardened source-only units
if: >-
needs.ownership-impact.result == 'success' &&
needs.ownership-impact.outputs.run_unit_tests == 'true'
env:
TRTMC_UNIT_SCOPE: ${{ needs.ownership-impact.outputs.unit_scope }}
TRTMC_PREMERGE_PYTHON_TEST_TARGETS: >-
${{ needs.ownership-impact.outputs.python_test_targets }}
run: python3 -m tools.community_ci unit --scope "$TRTMC_UNIT_SCOPE"
required:
name: Community CPU / Required
if: ${{ !cancelled() }}
needs:
- source-quality
- docs
- ownership-impact
- unit
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions: {}
steps:
- name: Require every public CPU stage
env:
SOURCE_QUALITY_RESULT: ${{ needs.source-quality.result }}
DOCS_RESULT: ${{ needs.docs.result }}
OWNERSHIP_IMPACT_RESULT: ${{ needs.ownership-impact.result }}
UNIT_RESULT: ${{ needs.unit.result }}
run: |
set -euo pipefail
printf '%s\n' \
"Source quality: $SOURCE_QUALITY_RESULT" \
"Docs: $DOCS_RESULT" \
"Ownership and impact: $OWNERSHIP_IMPACT_RESULT" \
"Unit / C++ and Python: $UNIT_RESULT"
test "$SOURCE_QUALITY_RESULT" = success
test "$DOCS_RESULT" = success
test "$OWNERSHIP_IMPACT_RESULT" = success
test "$UNIT_RESULT" = success