Repository navigation
docs: align current architecture with automatic native quality #1288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preset Lab | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: preset-lab-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| measurements: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| 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 focused Native trails validation integrity | |
| run: python -m unittest discover -s tools/native-trails -v | |
| - 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 |