CI #12
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
| # CI Workflow for VLLM Plugin FL | |
| # This workflow defines the CI process for the VLLM Plugin FL project. | |
| # It includes linting and platform-specific testing stages. | |
| name: CI | |
| on: | |
| schedule: | |
| - cron: '0 18 * * *' # daily at 2:00 AM CST (UTC+8) | |
| pull_request: | |
| branches: [main, devops] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "examples/**" | |
| - "docker/**" | |
| - "LICENSE" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| - ".github/PULL_REQUEST_TEMPLATE.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ============================================================ | |
| # Job 1: Lint (ruff check, ruff format, typos) | |
| # Runs on every push/PR. Fast, no special requirements. | |
| # ============================================================ | |
| lint: | |
| uses: ./.github/workflows/_lint.yml | |
| # ============================================================ | |
| # Job 2: Build & install check | |
| # Verify the package can be built and installed cleanly. | |
| # ============================================================ | |
| build: | |
| needs: lint | |
| uses: ./.github/workflows/_build_wheel.yml | |
| # ============================================================ | |
| # Job 3: Discover which platforms to test | |
| # ============================================================ | |
| discover: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| platforms: ${{ steps.detect.outputs.platforms }} | |
| steps: | |
| - name: Checkout (attempt 1) | |
| id: checkout1 | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| .github/configs | |
| .github/scripts | |
| continue-on-error: true | |
| - name: Checkout (attempt 2) | |
| id: checkout2 | |
| if: steps.checkout1.outcome == 'failure' | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| .github/configs | |
| .github/scripts | |
| continue-on-error: true | |
| - name: Checkout (attempt 3) | |
| if: steps.checkout2.outcome == 'failure' | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| .github/configs | |
| .github/scripts | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - id: detect | |
| run: python3 .github/scripts/detect_platforms.py | |
| # ============================================================ | |
| # Job 4a: CUDA platform testing | |
| # ============================================================ | |
| test-cuda: | |
| needs: discover | |
| if: contains(fromJson(needs.discover.outputs.platforms), 'cuda') | |
| uses: ./.github/workflows/_platform_test.yml | |
| with: | |
| platform: cuda | |
| secrets: inherit | |
| # ============================================================ | |
| # Job 4b: Ascend platform testing | |
| # ============================================================ | |
| test-ascend: | |
| needs: discover | |
| if: contains(fromJson(needs.discover.outputs.platforms), 'ascend') | |
| uses: ./.github/workflows/_platform_test.yml | |
| with: | |
| platform: ascend | |
| secrets: inherit |