[CI] Add ci monitor balance workflow (#11962)

This commit is contained in:
Xiaoyu Zhang
2025-10-25 12:14:36 -07:00
committed by GitHub
parent e8b71445c0
commit d0cff78f54
5 changed files with 655 additions and 87 deletions
+37 -1
View File
@@ -2,7 +2,8 @@ name: CI Monitor
on:
schedule:
- cron: '0 */12 * * *'
- cron: '0 */12 * * *' # Every 12 hours for main analysis
- cron: '0 6 * * *' # Daily at 6:00 AM UTC for balance analysis
workflow_dispatch:
inputs:
limit:
@@ -63,3 +64,38 @@ jobs:
scripts/ci_monitor/ci_analysis_*.json
scripts/ci_monitor/performance_tables_*
retention-days: 30
ci-monitor-balance:
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run Test Balance Analysis
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_FOR_NIGHTLY_CI }}
PYTHONUNBUFFERED: 1
PYTHONIOENCODING: utf-8
run: |
cd scripts/ci_monitor
python ci_analyzer_balance.py --token $GITHUB_TOKEN --limit ${{ inputs.limit || '1000' }} --output test_balance_report_$(date +%Y%m%d_%H%M%S).json
- name: Upload Balance Analysis Results
uses: actions/upload-artifact@v4
with:
name: test-balance-results-${{ github.run_number }}
path: |
scripts/ci_monitor/test_balance_report_*.json
scripts/ci_monitor/test_balance_report_*.csv
retention-days: 30