纳管 AMESim 对齐基线、发布锁、回归测试及当前物理门禁调整。 更新日志仅记录已完成成果,并注明当前 HEAD 尚待真实 production 复跑与远端 workflow 验证。
181 lines
5.7 KiB
YAML
181 lines
5.7 KiB
YAML
name: Solver regression
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "app/simulation/**"
|
|
- "tests/**"
|
|
- "requirements.txt"
|
|
- "constraints/**"
|
|
- ".python-version"
|
|
- "README.md"
|
|
- ".github/workflows/solver-regression.yml"
|
|
pull_request:
|
|
paths:
|
|
- "app/simulation/**"
|
|
- "tests/**"
|
|
- "requirements.txt"
|
|
- "constraints/**"
|
|
- ".python-version"
|
|
- "README.md"
|
|
- ".github/workflows/solver-regression.yml"
|
|
schedule:
|
|
- cron: "17 3 * * 1-6"
|
|
- cron: "17 3 * * 0"
|
|
workflow_dispatch:
|
|
inputs:
|
|
suite:
|
|
description: Regression tier
|
|
required: true
|
|
default: quick
|
|
type: choice
|
|
options:
|
|
- quick
|
|
- historical
|
|
- main-long
|
|
case:
|
|
description: Longest main-model horizon (predecessors run first)
|
|
required: true
|
|
default: 0.2s
|
|
type: choice
|
|
options:
|
|
- 0.2s
|
|
- 1s
|
|
- 5s
|
|
- 10s
|
|
lane:
|
|
description: Output sampling lane
|
|
required: true
|
|
default: production
|
|
type: choice
|
|
options:
|
|
- solver-only
|
|
- production
|
|
|
|
concurrency:
|
|
group: solver-regression-${{ github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
quick:
|
|
if: >-
|
|
github.event_name == 'push' ||
|
|
github.event_name == 'pull_request' ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.suite == 'quick')
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: .python-version
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
requirements.txt
|
|
constraints/python312-direct.txt
|
|
constraints/python312-linux-x86_64.lock
|
|
- name: Install hashed Linux release lock
|
|
run: |
|
|
python -m pip install \
|
|
--force-reinstall \
|
|
-r constraints/python312-linux-x86_64.lock
|
|
python -m pip check
|
|
- name: Run solver foundation tests
|
|
env:
|
|
SYSTEM_SIMULATION_VERIFY_LOCKED_ENV: "1"
|
|
run: |
|
|
python -W error::ResourceWarning -m unittest \
|
|
tests.test_dependency_constraints \
|
|
tests.test_benchmark_regression \
|
|
tests.test_physical_state_v21 \
|
|
tests.test_test_mql_ame_contract \
|
|
tests.test_test_mql_8_regression \
|
|
tests.test_mql_full_branches_regression \
|
|
tests.test_pressure_flow_causal_execution \
|
|
tests.test_stream_pressure_block_solver \
|
|
tests.test_core_solver \
|
|
tests.test_supported_piston_tangent \
|
|
tests.test_three_piston_tangent \
|
|
tests.test_sparse_secant_jacobian \
|
|
tests.test_generic_jacobian_sparsity \
|
|
tests.test_generic_system_xml_simulation
|
|
|
|
historical-nightly:
|
|
if: >-
|
|
(github.event_name == 'schedule' && github.event.schedule == '17 3 * * 1-6') ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.suite == 'historical')
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: .python-version
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
requirements.txt
|
|
constraints/python312-direct.txt
|
|
constraints/python312-linux-x86_64.lock
|
|
- name: Install hashed Linux release lock
|
|
run: |
|
|
python -m pip install \
|
|
--force-reinstall \
|
|
-r constraints/python312-linux-x86_64.lock
|
|
python -m pip check
|
|
- name: Run 0.81 and 2.10 second historical regression
|
|
run: |
|
|
mkdir -p artifacts
|
|
python -m app.simulation.benchmark_regression \
|
|
--manifest tests/baselines/simulation/test_mql_full_branches/manifest.json \
|
|
--lane production \
|
|
--output artifacts/test-mql-full-branches.json
|
|
- if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: historical-solver-regression
|
|
path: artifacts/*.json
|
|
if-no-files-found: warn
|
|
|
|
main-periodic:
|
|
if: >-
|
|
(github.event_name == 'schedule' && github.event.schedule == '17 3 * * 0') ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.suite == 'main-long')
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: .python-version
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
requirements.txt
|
|
constraints/python312-direct.txt
|
|
constraints/python312-linux-x86_64.lock
|
|
- name: Install hashed Linux release lock
|
|
run: |
|
|
python -m pip install \
|
|
--force-reinstall \
|
|
-r constraints/python312-linux-x86_64.lock
|
|
python -m pip check
|
|
- name: Run bounded progressive main-model regression
|
|
env:
|
|
REQUESTED_CASE: ${{ github.event_name == 'workflow_dispatch' && inputs.case || '10s' }}
|
|
REQUESTED_LANE: ${{ github.event_name == 'workflow_dispatch' && inputs.lane || 'production' }}
|
|
run: |
|
|
mkdir -p artifacts
|
|
python -m app.simulation.benchmark_regression \
|
|
--manifest tests/baselines/simulation/test_mql_8/manifest.json \
|
|
--lane "$REQUESTED_LANE" \
|
|
--case "$REQUESTED_CASE" \
|
|
--output artifacts/test-mql-8-progressive.json
|
|
- if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: main-model-progressive-regression
|
|
path: artifacts/*.json
|
|
if-no-files-found: warn
|