Repository navigation
100 lines (96 loc) · 4.86 KB
/
Copy pathci.yml
File metadata and controls
100 lines (96 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
verify:
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Lint and format
run: |
ruff check aethermor/physics/thermal.py aethermor/physics/cooling.py aethermor/physics/chip_floorplan.py aethermor/analysis/inverse_design.py aethermor/analysis/uncertainty.py aethermor/validation/engineering.py aethermor/demo.py aethermor/cli.py tests/verification examples scripts/generate_validation_report.py benchmarks/performance
ruff format --check aethermor/physics/thermal.py aethermor/physics/cooling.py aethermor/physics/chip_floorplan.py aethermor/analysis/inverse_design.py aethermor/analysis/uncertainty.py aethermor/validation/engineering.py aethermor/demo.py aethermor/cli.py tests/verification examples scripts/generate_validation_report.py benchmarks/performance
- name: Core unit tests
run: python -m pytest tests/unit/test_thermal_transport.py tests/unit/test_cooling.py tests/unit/test_chip_floorplan.py tests/unit/test_thermal_optimizer.py tests/unit/test_registry.py -q
- name: Scientific verification with coverage
run: |
coverage run --timid -m pytest tests/verification -q
coverage report --fail-under=75 -m aethermor/physics/thermal.py aethermor/analysis/inverse_design.py aethermor/analysis/uncertainty.py
- name: Canonical validation report
run: python -m scripts.generate_validation_report
- name: Inverse-design demo smoke
run: aethermor demo --samples 30 --no-plots
- name: Canonical example smoke
run: |
python -m examples.steady_power_map
python -m examples.maximum_power
python -m examples.architecture_tradeoff
- name: Claim/evidence check
run: python scripts/check_claims.py
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: validation-py${{ matrix.python-version }}
path: reports/latest_validation_report.*
package:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38
with:
python-version: "3.12"
- name: Build wheel and sdist
run: |
python -m pip install --upgrade pip build twine
test ! -e /tmp/aethermor-dist
mkdir /tmp/aethermor-dist
python -m build --outdir /tmp/aethermor-dist
test "$(find /tmp/aethermor-dist -maxdepth 1 -name '*.whl' | wc -l)" -eq 1
test "$(find /tmp/aethermor-dist -maxdepth 1 -name '*.tar.gz' | wc -l)" -eq 1
python -m twine check /tmp/aethermor-dist/*
unzip -l /tmp/aethermor-dist/aethermor-2.0.0rc1-py3-none-any.whl | grep 'validation/reproduce_external.py'
unzip -l /tmp/aethermor-dist/aethermor-2.0.0rc1-py3-none-any.whl | grep 'tools/external/hotspot/install_hotspot.py'
- name: Clean installed-wheel smoke outside checkout
run: |
python -m venv /tmp/aethermor-wheel
/tmp/aethermor-wheel/bin/pip install /tmp/aethermor-dist/aethermor-2.0.0rc1-py3-none-any.whl
cd /tmp
/tmp/aethermor-wheel/bin/pip check
/tmp/aethermor-wheel/bin/aethermor version | grep '2.0.0rc1'
/tmp/aethermor-wheel/bin/aethermor validate --json
/tmp/aethermor-wheel/bin/aethermor demo --samples 20 --no-plots
/tmp/aethermor-wheel/bin/python -c 'import aethermor, pathlib; assert not pathlib.Path(aethermor.__file__).resolve().is_relative_to(pathlib.Path("'"$GITHUB_WORKSPACE"'").resolve())'
- name: Clean installed-sdist smoke outside checkout
run: |
python -m venv /tmp/aethermor-sdist
/tmp/aethermor-sdist/bin/pip install /tmp/aethermor-dist/aethermor-2.0.0rc1.tar.gz
cd /tmp
/tmp/aethermor-sdist/bin/pip check
/tmp/aethermor-sdist/bin/aethermor version | grep '2.0.0rc1'
/tmp/aethermor-sdist/bin/aethermor validate --json
security:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38
with:
python-version: "3.12"
- run: python -m pip install -e ".[dev]"
- run: pip-audit --requirement requirements-lock.txt