Repository navigation
Sanitize stored CI output / 清理存储的 CI 输出 #9399
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: CI | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: &python-paths | |
| - '**/*.py' | |
| - 'collectivex/**' | |
| - '.github/workflows/**' | |
| - 'inferencex-e2e/pyproject.toml' | |
| - 'inferencex-e2e/uv.lock' | |
| - 'inferencex-e2e/.python-version' | |
| - 'inferencex-e2e/infx/**' | |
| - 'inferencex-e2e/benchmarks/**' | |
| - 'power_model/pyproject.toml' | |
| - '**/pytest.ini' | |
| - 'inferencex-e2e/configs/**' | |
| - 'inferencex-e2e/utils/srt-slurm' | |
| push: | |
| branches: [main] | |
| paths: *python-paths | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: ${{ matrix.check }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| check: [Lint, Tests] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| # A pull request checks out its merge commit; HEAD^1 is the base the changelog check compares. | |
| fetch-depth: 2 | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| working-directory: inferencex-e2e | |
| cache-suffix: ${{ matrix.check }} | |
| cache-dependency-glob: | | |
| .python-version | |
| pyproject.toml | |
| uv.lock | |
| - name: Lint and format | |
| if: matrix.check == 'Lint' | |
| run: | | |
| uvx --exclude-newer PT12H ruff@latest check --output-format=github inferencex-e2e/infx power_model | |
| uvx --exclude-newer PT12H ruff@latest format --check --diff inferencex-e2e/infx power_model | |
| - name: Prepare test environment | |
| if: matrix.check == 'Tests' | |
| run: | | |
| git submodule update --init inferencex-e2e/utils/srt-slurm | |
| uv sync --project inferencex-e2e --locked --all-extras --group test --no-editable | |
| echo "$GITHUB_WORKSPACE/inferencex-e2e/.venv/bin" >> "$GITHUB_PATH" | |
| - name: Check CollectiveX coverage manifest | |
| if: matrix.check == 'Tests' | |
| run: | | |
| python collectivex/sweep_matrix.py --suites ep,swap-blocks --cases-json collectivex/results/cases.json > /dev/null | |
| git diff --exit-code -- collectivex/results/cases.json | |
| - name: Check CollectiveX changelog | |
| if: matrix.check == 'Tests' | |
| env: | |
| BASE_REF: ${{ github.base_ref }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if [ -n "$BASE_REF" ]; then | |
| python collectivex/changelog.py validate --base-ref HEAD^1 --pr-number "$PR_NUMBER" | |
| else | |
| python collectivex/changelog.py validate | |
| fi | |
| - name: Run tests | |
| if: matrix.check == 'Tests' | |
| run: | | |
| python -c "import torch; assert torch.version.cuda is None and torch.version.hip is None" | |
| python -m pytest -c inferencex-e2e/pyproject.toml inferencex-e2e/infx/tests/ collectivex/tests/ operatorx/tests/ ubenchX/ -n 4 --dist worksteal | |
| python -m pytest -c power_model/pyproject.toml power_model/tests -n 4 |