2626 - name : Build Faust
2727 run : |
2828 make -C build cmake BACKENDS=regular.cmake TARGETS=win-ci.cmake
29- make -C build
29+ make -C build
30+
31+ - name : Run parser FileResolver tests
32+ shell : pwsh
33+ run : |
34+ $buildDir = "compiler\tests\parser\build-ci"
35+ if (Test-Path $buildDir) { Remove-Item $buildDir -Recurse -Force }
36+ New-Item -ItemType Directory -Force -Path $buildDir | Out-Null
37+ cl /nologo /std:c++17 /EHsc /I compiler compiler\tests\parser\test_file_resolver.cpp /Fe:$buildDir\file_resolver_tests.exe
38+ & "$buildDir\file_resolver_tests.exe"
39+
40+ - name : Compile example DSPs with Faust
41+ shell : bash
42+ run : |
43+ python - <<'PY'
44+ import os
45+ import pathlib
46+ import subprocess
47+
48+ repo_root = pathlib.Path(".").resolve()
49+ faust = repo_root / "build" / "bin" / "faust.exe"
50+ if not faust.exists() :
51+ faust = faust.with_suffix("")
52+ if not faust.exists() :
53+ raise SystemExit(f"Faust executable not found at {faust}")
54+
55+ examples_root = repo_root / "examples"
56+ if not examples_root.exists() :
57+ raise SystemExit(f"Examples directory not found at {examples_root}")
58+
59+ libraries_dir = repo_root / "libraries"
60+
61+ output_root = repo_root / "build" / "ci_examples"
62+ output_root.mkdir(parents=True, exist_ok=True)
63+
64+ failures = []
65+
66+ for dsp in sorted(examples_root.rglob("*.dsp")) :
67+ rel = dsp.relative_to(examples_root)
68+ safe_name = "_".join(rel.parts).replace(".dsp", "")
69+ target = output_root / f"{safe_name}.cpp"
70+ cmd = [
71+ str(faust),
72+ " -lang" ,
73+ " cpp" ,
74+ " -I" ,
75+ str(libraries_dir),
76+ " -o" ,
77+ str(target),
78+ str(dsp),
79+ ]
80+ result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
81+ if result.returncode != 0 :
82+ log = result.stderr if result.stderr else result.stdout
83+ failures.append((dsp, log))
84+
85+ if failures :
86+ for dsp, log in failures :
87+ print(f"--- Failed : {dsp} ---")
88+ print(log)
89+ raise SystemExit(f"{len(failures)} example DSP(s) failed to compile")
90+ PY
0 commit comments