Repository navigation
93 lines (90 loc) · 4.29 KB
/
Copy pathpreset-lab.yml
File metadata and controls
93 lines (90 loc) · 4.29 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
name: Preset Lab
on:
workflow_call:
inputs:
source_ref:
type: string
default: ''
workflow_dispatch:
permissions:
contents: read
jobs:
measurements:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_ref || github.sha }}
persist-credentials: false
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Refresh package metadata
run: sudo apt-get update
- name: Install audio and headless OpenGL tools
run: sudo apt-get install -y ffmpeg cmake glslang-tools libsdl2-dev libgl1-mesa-dev xvfb xauth
- name: Install pinned Python dependencies
run: python -m pip install -r tools/preset-lab/requirements.lock
- name: Install Preset Lab
run: python -m pip install --no-deps -e tools/preset-lab
- name: Test measurements, cache reuse and bundle integrity
run: python -m pytest tools/preset-lab/tests -m 'not native' -q
- name: Test Native trails validation integrity
run: python -m pytest tools/native-trails -q
- name: Verify source-bound predictive collections beta
run: python tools/milk-analyzer/beta_export.py --check --bundle core/src/main/assets/preset-genres
- name: Reject tracked user audio and raw captures
run: |
python - <<'PY'
import subprocess
from pathlib import Path
forbidden = {'.m4a', '.webm', '.wav', '.mp3', '.flac', '.ogg', '.opus', '.aac', '.f32', '.rgb', '.mp4'}
files = subprocess.check_output(['git', 'ls-files', '-z', 'tools/preset-lab', 'tools/milk-analyzer', 'core/src/main/assets/preset-genres']).decode().split('\0')
invalid = [name for name in files if name and Path(name).suffix.lower() in forbidden]
if invalid:
raise SystemExit('User audio/raw captures must remain untracked: ' + ', '.join(invalid))
PY
- name: Supply the pinned engine's missing standard header on GCC
run: |
printf '#!/bin/sh\nexec /usr/bin/g++ -include algorithm "$@"\n' > "$RUNNER_TEMP/preset-lab-cxx"
chmod +x "$RUNNER_TEMP/preset-lab-cxx"
echo "CXX=$RUNNER_TEMP/preset-lab-cxx" >> "$GITHUB_ENV"
- name: Verify the actual native rendering backend
run: xvfb-run -a preset-lab doctor --repo . --work build/preset-lab-ci > build/preset-lab-ci-doctor.json
- name: Build source-analysis adapters against the same pinned engine
run: |
python - <<'PYCODE'
import json
from pathlib import Path
import subprocess
from preset_lab.build_worker import prepare_engine
work = Path('build/preset-lab-ci')
source, _ = prepare_engine(Path('.'), work)
engine_build = Path(json.loads(Path('build/preset-lab-ci-doctor.json').read_text())['worker']).parent
subprocess.run(['cmake', '-S', 'tools/milk-analyzer', '-B', 'build/milk-analyzer/native',
f'-DENGINE_SOURCE={source}', f'-DENGINE_BUILD={engine_build}',
f'-DENGINE_IDENTITY_FILE={engine_build / "build-identity.json"}',
'-DSANITIZERS=OFF'], check=True)
subprocess.run(['cmake', '--build', 'build/milk-analyzer/native', '-j', '4'], check=True)
PYCODE
- name: Test production feedback shaders and lifecycle
run: |
sudo apt-get install -y libgtest-dev libegl-dev libgles-dev
core/src/test/native/run_native_tests.sh
xvfb-run -a tools/projectm-host-tests.sh
- name: Test source equation domains and shader initialization
run: python -m pytest tools/milk-analyzer -q
- name: Test real native shader and bass response
run: |
PRESET_LAB_WORKER=$(python -c 'import json; print(json.load(open("build/preset-lab-ci-doctor.json"))["worker"])') xvfb-run -a python -m pytest tools/preset-lab/tests -m native -q
- uses: actions/upload-artifact@v4
if: always()
with:
name: preset-lab-backend-evidence
path: |
build/preset-lab-ci-doctor.json
build/preset-lab-ci/**/build.log
if-no-files-found: ignore