Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/p1-windows.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
name: Windows Native VST3 Host
on:
# Single canonical Windows release producer: main changes to shipped runtime,
# native C++ or distribution scripts. Historical feature branch pushes are PRs.
push:
branches: [ main, feature/p1-first-sound-windows, feature/p2-native-vst-catalog-fx-rack, feature/p2-daw-workflow-progress, fix/p2-native-output-monitor-diagnostics, fix/p2-realtime-glitch-telemetry-latest-gui, fix/p2-truthful-meter-pan-fx-toggle, feature/p2-native-state-presets, fix/p2-fabfilter-add-workflow, feature/p25-live-preset-graph-swap, integration/p25-gui-engine-reconciled, integration/main-v08-gui-p25-native ]
branches: [main]
paths:
- 'CMakeLists.txt'
- 'src/**'
- 'engine/**'
- 'web/**'
- 'AR-MIX-Live-FX-Host-Standalone-v0.3.html'
- 'scripts/build_ui_css.py'
- 'tests/*.cpp'
- 'scripts/package_native_windows.ps1'
- 'scripts/verify_native_windows_artifact.ps1'
- '.github/workflows/p1-windows.yml'
# GUI-only PRs receive browser checks; they need not compile JUCE on every edit.
# A merged GUI change is still packaged once on main, or manually for FAT.
pull_request:
paths:
- 'CMakeLists.txt'
- 'src/**'
- 'engine/**'
- 'tests/*.cpp'
- 'tests/*native*contract*.mjs'
- 'tests/live_graph_contract_test.mjs'
- 'tests/ci_workflow_efficiency_test.mjs'
- 'scripts/package_native_windows.ps1'
- 'scripts/verify_native_windows_artifact.ps1'
- '.github/workflows/p1-windows.yml'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -76,7 +102,10 @@ jobs:
run: |
& ./scripts/verify_native_windows_artifact.ps1 -OutputDir dist
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# Compile + CTest + distribution verification gate PRs; upload only
# qualified main builds or an explicit branch FAT workflow_dispatch.
- uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'pull_request' }}
with:
name: ArSonMix-GUI10CH-P012-Verified-Hardware-FAT-Windows-x64
path: dist/
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/pages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,34 @@ concurrency:

jobs:
build:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') }}
runs-on: ubuntu-latest
outputs:
fresh: ${{ steps.guard.outputs.fresh }}
steps:
- name: Checkout exact qualified main GUI revision
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || 'main' }}
persist-credentials: false
- name: Skip superseded Pages builds
id: guard
shell: bash
run: |
SOURCE_SHA="$(git rev-parse HEAD)"
CURRENT_MAIN="$(git ls-remote origin refs/heads/main | cut -f1)"
if [ "$SOURCE_SHA" = "$CURRENT_MAIN" ]; then
echo "fresh=true" >> "$GITHUB_OUTPUT"
else
echo "fresh=false" >> "$GITHUB_OUTPUT"
echo "Skipping obsolete qualified Pages SHA $SOURCE_SHA; main is $CURRENT_MAIN"
fi
- uses: actions/setup-python@v5
if: ${{ steps.guard.outputs.fresh == 'true' }}
with:
python-version: '3.12'
- name: Build static landing and approved mixer preview
if: ${{ steps.guard.outputs.fresh == 'true' }}
run: |
SOURCE_SHA="$(git rev-parse HEAD)"
node --check web/app.js
Expand All @@ -38,14 +54,17 @@ jobs:
python tests/fader_asset_test.py
python tests/pan_button_asset_test.py
- name: Configure GitHub Pages
if: ${{ steps.guard.outputs.fresh == 'true' }}
uses: actions/configure-pages@v5
- name: Upload site bundle
if: ${{ steps.guard.outputs.fresh == 'true' }}
uses: actions/upload-pages-artifact@v3
with:
path: dist-pages

deploy:
needs: build
if: ${{ needs.build.outputs.fresh == 'true' }}
runs-on: ubuntu-latest
permissions:
pages: write
Expand Down
33 changes: 27 additions & 6 deletions .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,32 @@ on:
- 'AR-MIX-Live-FX-Host-Standalone-v0.3.html'
- 'scripts/build_pages.py'
- 'tests/**'
- 'scripts/build_ui_css.py'
- '.github/workflows/ui-smoke.yml'
- '.github/workflows/pages-publish.yml'
- 'README.md'
- 'AGENTS.md'
- 'docs/GUI_BASELINE_LOCK_2026-10-25.md'
- 'docs/ARD_SMART_AUDIO_ENGINE_V1_2026-10-25.md'
- 'docs/SMART_AUDIO_ENGINE_IMPLEMENTATION_BLUEPRINT.md'
pull_request:
paths:
- 'web/**'
- 'site/**'
- 'AR-MIX-Live-FX-Host-Standalone-v0.3.html'
- 'scripts/build_pages.py'
- 'scripts/build_ui_css.py'
- 'tests/*.py'
- 'tests/gui_workflow_contract_test.mjs'
- 'tests/*gui*contract*.mjs'
- 'tests/native_ui_contract_test.mjs'
- 'tests/native_orbit_ui_smoke.py'
- 'tests/ci_workflow_efficiency_test.mjs'
- '.github/workflows/ui-smoke.yml'
- '.github/workflows/pages-publish.yml'
workflow_dispatch:

# New PR commits supersede old UI checks. The production Pages dispatcher
# only reacts to a completed successful main push, never cancelled checks.
concurrency:
group: ui-smoke-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -39,7 +55,7 @@ jobs:
- name: Validate JavaScript syntax
run: |
node --check web/app.js
node --test tests/gui_workflow_contract_test.mjs
node --test tests/gui_workflow_contract_test.mjs tests/ci_workflow_efficiency_test.mjs
- name: Validate approved GUI checkpoint and single publisher
run: python tests/gui_baseline_lock_test.py
- name: Validate smart audio architecture handoff contract
Expand All @@ -59,9 +75,13 @@ jobs:
run: python tests/ui_smoke.py
- name: Verify MIX and FX RACK Auto Orbit workflow
run: python tests/native_orbit_ui_smoke.py
# Firefox perf is deliberate: main release verification or manual opt-in.
# Do not download/run a second browser for every iterative GUI PR.
- name: Install Firefox for compositor functional regression
if: ${{ github.event_name != 'pull_request' }}
run: python -m playwright install firefox
- name: Run Firefox opt-in performance diagnostics smoke
if: ${{ github.event_name != 'pull_request' }}
run: python tests/ui_firefox_perf_smoke.py
- name: Attach visual regression screenshots
if: always()
Expand All @@ -83,3 +103,4 @@ jobs:
mixer-inter-recessed-toggle-review.png
mixer-left-rail-unified-button180-pan-131512.png
if-no-files-found: ignore
retention-days: 3
34 changes: 34 additions & 0 deletions docs/CI_WORKFLOW_STRATEGY_20261028.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ArSonMix CI — efficient build / test / artifact contract (2026-10-28)

## One change, one appropriate validation lane

| Change | Pull request | After merging to main | User artifact |
|---|---|---|---|
| C++ `src/**`, `engine/**`, CMake, native tests | Windows MSVC Release + CTest + verified ZIP contents; UI only if UI paths also change | One Windows native run | One verified Windows x64 FAT artifact |
| GUI-only `web/**` or standalone | Chromium browser tests, GUI visual/interaction checks. No unnecessary Windows MSVC build | Chromium + one Windows packaged release, concurrently; Pages follows successful main Chromium | Latest main Windows artifact |
| Documentation-only | No costly C++/Chromium runner automatically | None unless a production input was changed | None (last qualified binary remains valid) |
| Hardware FAT on an unmerged branch | Select **Run workflow** for Windows Native VST3 Host on that branch | Not needed | Explicit branch Windows artifact |

Windows is the **single** producer of the distributable executable and must always run CTest, package and the independent ZIP/embedded GUI/provenance audit before upload. Pull requests deliberately do not upload a binary by default. The user or maintainer can request a branch FAT package through `workflow_dispatch`. Do not add independent Windows packaging workflows, publish an arbitrary test EXE, or ask for new hardware captures after every tiny edit.

## Queue and browser rules

- GitHub Actions concurrency cancels superseded in-progress Windows/Chromium PR attempts and old main revisions. A new commit or force push becomes the one revision to validate.
- UI PR checks run Chromium only. Firefox/compositor diagnostics remain on `main` (or explicit manual dispatch) as a heavier performance gate. Do not install both browser engines for every GUI iteration.
- Pages is **one** existing publisher, triggered only after successful **push-to-main** UI smoke. It checks out exactly the qualified head SHA and skips publishing when that SHA has been superseded by newer main. It will never deploy a PR or canceled/stale check. No parallel publisher and no redundant Pages deploy for native-only or docs-only changes.
- Screenshots retain only 3 days; Windows release FAT artifact retention remains 14 days. Raise retention only when there is an explicit long-running investigation.
- Trigger filters must include all code paths that affect the relevant shipped output. When introducing a new Windows build input, update the Windows paths list; when introducing a GUI input, update UI paths. Do not make the filters so narrow that a release could omit a change.
- If a required branch protection status requires both Windows and UI on all PRs, update required-check rules together with these path gates. Skipped workflows can otherwise be reported as pending by legacy branch protection. This GitHub connection cannot change rulesets automatically.

## Safety and transparency

A passing Windows job proves compilation, automated numerical/contract tests and release artifact integrity, **not** zero-crackle hardware audio or vendor sound positioning. A passing Chromium job proves UI interaction, **not** a native JUCE/WebView2 boot on arbitrary Windows devices. Audio callback performance and P0 issue #15 still need physical evidence.


## Reconciliation to current main (2026-10-28)

The CI change was rebuilt from main `c0d7c794a27fcdc7adbe77c6166a2e97b848b82c` rather than merging an older Windows workflow file. The existing Windows Release target list is preserved, including `ARMixFxBypassEnvelopeTests` and `ARMixDearVrPolarPolicyTests`. Only CI triggers, artifact gating, UI browser cadence and Pages freshness are changed. `tests/ci_workflow_efficiency_test.mjs` fails if mandatory audio regressions disappear from the future Windows target list.

The stacked routing PRs #108 → #110 → #111 remain **unmerged** and use the existing Windows workflow; when their CTest targets are integrated, do not replace their updated targets with a stale fixed list. PR #102 drag/reorder is independent and currently conflicting. Zero-plugin crackles #15 still need physical evidence, outside CI optimization.

Pages publishing has an explicit freshness check. A successful PR browser smoke may not publish to Pages: only successful UI smoke from `main` pushes qualifies. UI and Windows checks can execute concurrently on main, but only Windows creates the downloadable native ZIP. Branch-specific hardware builds remain an explicit manual request.
48 changes: 48 additions & 0 deletions tests/ci_workflow_efficiency_test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: AGPL-3.0-only
import test from 'node:test';
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
const read=file=>readFileSync(file,'utf8');
const windows=read('.github/workflows/p1-windows.yml');
const ui=read('.github/workflows/ui-smoke.yml');
const pages=read('.github/workflows/pages-publish.yml');
test('only main and explicitly selected branch can produce a Windows FAT artifact',()=>{
assert.match(windows,/branches: \[main\]/);
assert.doesNotMatch(windows,/branches: \[ main, feature\//);
assert.match(windows,/pull_request:\s+paths:/);
assert.match(windows,/'src\/\*\*'/);
assert.match(windows,/'engine\/\*\*'/);
assert.match(windows,/'web\/\*\*'/);
assert.match(windows,/workflow_dispatch:/);
assert.match(windows,/cancel-in-progress: true/);
assert.match(windows,/if: \$\{\{ github\.event_name != 'pull_request' \}\}/);
assert.ok(windows.indexOf('scripts/verify_native_windows_artifact.ps1') <
windows.indexOf('uses: actions/upload-artifact@v4'));
});
test('UI PRs have one cancellable Chromium gate; heavy Firefox is main/manual only',()=>{
assert.match(ui,/concurrency:\s+group: ui-smoke-/);
assert.match(ui,/cancel-in-progress: true/);
assert.match(ui,/pull_request:\s+paths:/);
assert.match(ui,/'web\/\*\*'/);
const tail=ui.split('name: Install Firefox for compositor functional regression')[1];
assert.ok(tail && tail.includes("if: ${{ github.event_name != 'pull_request' }}"));
assert.match(ui,/retention-days: 3/);
});
test('exactly one guarded downstream Pages publisher; never a second automated publisher',()=>{
assert.match(pages,/workflows: \["UI smoke \(Chromium\)"\]/);
assert.match(pages,/github\.event\.workflow_run\.event == 'push'/);
assert.match(pages,/git ls-remote origin refs\/heads\/main/);
assert.match(pages,/if: \$\{\{ needs\.build\.outputs\.fresh == 'true' \}\}/);
assert.doesNotMatch(ui,/actions\/deploy-pages@/);
});

test('retain current native audio and dearVR CTests during CI optimization',()=>{
const targets=windows.split('name: Build executable and native RT tests')[1]?.split('\n')[1]||'';
for(const name of ['ARMixFxBypassEnvelopeTests','ARMixDearVrPolarPolicyTests',
'ARMixOrbitDistanceTests','ARMixOrbitMotionTests','ARMixRTTests']){
assert.ok(targets.includes(name),'Missing mandatory native regression '+name);
}
assert.match(windows,/ctest --test-dir build -C Release --output-on-failure/);
assert.match(windows,/'scripts\/build_ui_css\.py'/);
assert.match(windows,/if: \$\{\{ github\.event_name != 'pull_request' \}\}/);
});
Loading