102 lines
3.3 KiB
YAML
102 lines
3.3 KiB
YAML
name: Native backend regression
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "app/**"
|
|
- "native/**"
|
|
- "schemas/**"
|
|
- "tests/**"
|
|
- "requirements*.txt"
|
|
- "constraints/**"
|
|
- ".python-version"
|
|
- ".gitattributes"
|
|
- ".github/workflows/solver-regression.yml"
|
|
pull_request:
|
|
paths:
|
|
- "app/**"
|
|
- "native/**"
|
|
- "schemas/**"
|
|
- "tests/**"
|
|
- "requirements*.txt"
|
|
- "constraints/**"
|
|
- ".python-version"
|
|
- ".gitattributes"
|
|
- ".github/workflows/solver-regression.yml"
|
|
schedule:
|
|
- cron: "17 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: solver-regression-${{ github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
contracts:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: .python-version
|
|
cache: pip
|
|
cache-dependency-path: constraints/python312-linux-x86_64.lock
|
|
- name: Install backend runtime without numerical Python packages
|
|
run: |
|
|
python -m pip install -r constraints/python312-linux-x86_64.lock
|
|
python -m pip check
|
|
- name: Validate portable metadata and IR contracts
|
|
env:
|
|
SYSTEM_SIMULATION_VERIFY_LOCKED_ENV: "1"
|
|
run: |
|
|
python -W error::ResourceWarning -m unittest \
|
|
tests.test_dependency_constraints \
|
|
tests.test_regression_fixture_line_endings \
|
|
tests.test_component_catalog \
|
|
tests.test_component_metadata \
|
|
tests.test_component_registry \
|
|
tests.test_medium_reference_contract \
|
|
tests.test_system_xml_v3 \
|
|
tests.test_system_numeric_ir_v2 \
|
|
tests.test_native_only_backend
|
|
|
|
native-windows:
|
|
runs-on: windows-2022
|
|
timeout-minutes: 30
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: conda-incubator/setup-miniconda@v3
|
|
with:
|
|
python-version: "3.12"
|
|
activate-environment: simulation-native
|
|
auto-activate-base: false
|
|
- name: Install native compiler and SUNDIALS
|
|
run: |
|
|
conda install --yes -c conda-forge sundials=7.4.0 m2w64-gcc
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
"SUNDIALS_ROOT=$env:CONDA_PREFIX\Library" >> $env:GITHUB_ENV
|
|
"SIMULATION_NATIVE_CC=$env:CONDA_PREFIX\Library\mingw-w64\bin\gcc.exe" >> $env:GITHUB_ENV
|
|
python -m pip install -r requirements-test.txt
|
|
python -m pip check
|
|
- name: Run catalog, numerical, API and schema regression
|
|
run: |
|
|
python -c "from app.simulation.native_codegen.build import toolchain; print(toolchain())"
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
python -W error::ResourceWarning -m unittest discover -s tests
|
|
- name: Complete the 10 second skill fixture in native RK45
|
|
run: |
|
|
python -m app.simulation.native_codegen tests/data/native-skill-test.xml --output-dir test/ci-skill --method RK45 --max-step 0.001 --rtol 1e-7 --runs 1 --solve-only
|
|
- if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: native-skill-regression
|
|
path: test/ci-skill/summary.json
|
|
if-no-files-found: warn
|