Repository navigation
58 lines (56 loc) · 2.41 KB
/
Copy pathexternal-validation.yml
File metadata and controls
58 lines (56 loc) · 2.41 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
name: Pinned external validation
on:
workflow_dispatch:
push:
tags: ["v*rc*"]
pull_request:
paths:
- "aethermor/physics/**"
- "aethermor/analysis/inverse_design.py"
- "validation/**"
- "tools/external/**"
- "pyproject.toml"
- ".github/workflows/external-validation.yml"
jobs:
hotspot-v7:
runs-on: ubuntu-24.04
timeout-minutes: 240
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38
with:
python-version: "3.12"
- name: Install pinned system build prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential libblas-dev libsuperlu-dev
- name: Build release artifact
run: |
python -m pip install --upgrade pip build
test ! -e /tmp/aethermor-external-dist
mkdir /tmp/aethermor-external-dist
python -m build --outdir /tmp/aethermor-external-dist
test "$(find /tmp/aethermor-external-dist -maxdepth 1 -name '*.whl' | wc -l)" -eq 1
- name: Install wheel outside checkout
run: |
python -m venv /tmp/aethermor-external-venv
/tmp/aethermor-external-venv/bin/pip install -r requirements-lock.txt
/tmp/aethermor-external-venv/bin/pip install --no-deps /tmp/aethermor-external-dist/aethermor-2.0.0rc1-py3-none-any.whl
/tmp/aethermor-external-venv/bin/pip check
mkdir -p /tmp/aethermor-external-run
- name: Execute installed-wheel external suite
working-directory: /tmp/aethermor-external-run
run: |
/tmp/aethermor-external-venv/bin/aethermor validate --external \
--hotspot-source /tmp/hotspot-v7 \
--external-output-dir "$GITHUB_WORKSPACE/reports/ci_external"
- name: Verify installed import is outside checkout
working-directory: /tmp/aethermor-external-run
run: |
/tmp/aethermor-external-venv/bin/python -c 'import aethermor, pathlib; p=pathlib.Path(aethermor.__file__).resolve(); assert not p.is_relative_to(pathlib.Path("'"$GITHUB_WORKSPACE"'").resolve()); print(p)'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: hotspot-v7-validation-${{ github.sha }}
path: |
reports/ci_external/