Skip to content

CI

CI #146

Workflow file for this run

# Copyright 2026 FlagOS Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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]
types: [opened, synchronize, reopened, ready_for_review]
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:
# Skip: fork-internal PRs, draft PRs, PRs with WIP/wip in title
if: |
github.event_name != 'pull_request' ||
(
github.repository == 'flagos-ai/vllm-plugin-FL' &&
!github.event.pull_request.draft &&
!contains(github.event.pull_request.title, 'WIP') &&
!contains(github.event.pull_request.title, 'wip')
)
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
# ============================================================
# Job 4c: Hygon platform testing
# ============================================================
test-hygon:
needs: discover
if: contains(fromJson(needs.discover.outputs.platforms), 'hygon')
uses: ./.github/workflows/_platform_test.yml
with:
platform: hygon
secrets: inherit
# ============================================================
# Job 4d: Moore Threads MUSA platform testing
# ============================================================
test-musa:
needs: discover
if: contains(fromJson(needs.discover.outputs.platforms), 'musa')
uses: ./.github/workflows/_platform_test.yml
with:
platform: musa
secrets: inherit