Skip to content

Commit 8823a97

Browse files
committed
updates
1 parent 62d6ce2 commit 8823a97

464 files changed

Lines changed: 62374 additions & 1501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BasedOnStyle: LLVM
2+
ColumnLimit: 100
3+
IndentWidth: 2
4+
SortIncludes: CaseSensitive

.clang-tidy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Checks: >
2+
-*,
3+
bugprone-*,
4+
clang-analyzer-*,
5+
cppcoreguidelines-*,
6+
modernize-*,
7+
performance-*,
8+
portability-*,
9+
readability-*
10+
WarningsAsErrors: ''
11+
HeaderFilterRegex: 'cpp/(include|src)/.*'
12+
CheckOptions:
13+
readability-identifier-length.IgnoredVariableNames: 'id|it'

.github/workflows/native.yml

Lines changed: 326 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,326 @@
1+
name: Native and Python Quality
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "23 3 * * 2"
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
release-audit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.13"
21+
- name: Checkout pinned vcpkg
22+
uses: actions/checkout@v4
23+
with:
24+
repository: microsoft/vcpkg
25+
ref: f87344cac03158cbf1467264565f1fd36b382a24
26+
path: .vcpkg
27+
- run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
28+
- name: Generate SPDX document
29+
run: >-
30+
python oracle/generate_sbom.py --axklib-root .
31+
--output build/native/audit/axklib.spdx.json
32+
- name: Configure release audit
33+
env:
34+
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
35+
AXK_PATH_REMAP_FROM: ${{ github.workspace }}
36+
run: >-
37+
cmake -S . -B build/native/audit -G Ninja
38+
-DCMAKE_BUILD_TYPE=Release
39+
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
40+
-DVCPKG_TARGET_TRIPLET=x64-linux-axk
41+
-DVCPKG_OVERLAY_TRIPLETS=${{ github.workspace }}/cpp/cmake/triplets
42+
-DAXK_SBOM_FILE=${{ github.workspace }}/build/native/audit/axklib.spdx.json
43+
-DAXK_BUILD_CLI=OFF -DBUILD_TESTING=OFF -DAXK_BUILD_BENCHMARKS=ON
44+
- run: cmake --build build/native/audit
45+
- name: Benchmark and threshold check
46+
run: |
47+
build/native/audit/cpp/axk_workflow_benchmark \
48+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds \
49+
build/native/audit/benchmark.json
50+
python oracle/check_benchmark.py \
51+
cpp/benchmarks/baseline-linux-x64.json build/native/audit/benchmark.json
52+
- name: Install and inspect SDK
53+
run: |
54+
cmake --install build/native/audit --prefix build/native/audit-install
55+
test -f build/native/audit-install/share/axklib/axklib.spdx.json
56+
python oracle/inspect_package.py build/native/audit-install \
57+
--allow-library libaxklib_c.so \
58+
--allow-library libaxklib_c.so.0 \
59+
--allow-library libaxklib_c.so.0.1.0
60+
fuzz-smoke:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Checkout pinned vcpkg
65+
uses: actions/checkout@v4
66+
with:
67+
repository: microsoft/vcpkg
68+
ref: f87344cac03158cbf1467264565f1fd36b382a24
69+
path: .vcpkg
70+
- run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
71+
- name: Configure fuzzers
72+
env:
73+
CC: clang
74+
CXX: clang++
75+
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
76+
run: >-
77+
cmake -S . -B build/native/fuzz -G Ninja
78+
-DCMAKE_BUILD_TYPE=RelWithDebInfo
79+
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
80+
-DAXK_BUILD_CLI=OFF -DBUILD_TESTING=OFF -DAXK_BUILD_FUZZERS=ON
81+
- run: cmake --build build/native/fuzz
82+
- name: Fixed-budget parser smoke
83+
shell: bash
84+
run: |
85+
runs=200
86+
if [[ "${{ github.event_name }}" == "schedule" ]]; then runs=20000; fi
87+
targets=(
88+
bytes sfs_superblock sfs_index sfs_directory object_header
89+
object_smpl object_sbnk object_sbac object_prog object_sequ object_prf3
90+
fat_record iso_record build_manifest transaction
91+
)
92+
for target in "${targets[@]}"; do
93+
corpora=(cpp/fuzz/corpus/${target})
94+
if [[ "$target" == sfs_* ]]; then
95+
corpora+=(tests/fixtures/images/sampler-authored)
96+
fi
97+
build/native/fuzz/cpp/axk_${target}_fuzz \
98+
"${corpora[@]}" -runs=${runs} -max_len=4194304
99+
done
100+
101+
thread-sanitizer:
102+
runs-on: ubuntu-latest
103+
steps:
104+
- uses: actions/checkout@v4
105+
- name: Checkout pinned vcpkg
106+
uses: actions/checkout@v4
107+
with:
108+
repository: microsoft/vcpkg
109+
ref: f87344cac03158cbf1467264565f1fd36b382a24
110+
path: .vcpkg
111+
- run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
112+
- name: Configure
113+
env:
114+
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
115+
run: cmake --preset tsan
116+
- run: cmake --build --preset tsan
117+
- run: ctest --preset tsan -R 'CApi|Cancellation|Concurrent'
118+
119+
native:
120+
env:
121+
PYTHONPATH: ${{ github.workspace }}/oracle/python
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
os:
126+
- ubuntu-latest
127+
- windows-latest
128+
- macos-14
129+
runs-on: ${{ matrix.os }}
130+
steps:
131+
- uses: actions/checkout@v4
132+
133+
- uses: actions/setup-python@v5
134+
with:
135+
python-version: "3.13"
136+
- uses: astral-sh/setup-uv@v5
137+
with:
138+
enable-cache: true
139+
- run: uv sync --project oracle/python --locked
140+
141+
- name: Checkout pinned vcpkg
142+
uses: actions/checkout@v4
143+
with:
144+
repository: microsoft/vcpkg
145+
ref: f87344cac03158cbf1467264565f1fd36b382a24
146+
path: .vcpkg
147+
148+
- name: Bootstrap vcpkg (Unix)
149+
if: runner.os != 'Windows'
150+
run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
151+
152+
- name: Bootstrap vcpkg (Windows)
153+
if: runner.os == 'Windows'
154+
shell: pwsh
155+
run: .\.vcpkg\bootstrap-vcpkg.bat -disableMetrics
156+
157+
- name: Configure
158+
env:
159+
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
160+
run: cmake --preset debug
161+
162+
- name: Build
163+
run: cmake --build --preset debug
164+
165+
- name: Test
166+
run: ctest --preset debug
167+
168+
- name: Configure clang-tidy
169+
if: runner.os == 'Linux'
170+
env:
171+
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
172+
run: cmake --preset clang-tidy
173+
174+
- name: Run clang-tidy build
175+
if: runner.os == 'Linux'
176+
run: cmake --build --preset clang-tidy
177+
178+
- name: Python/C++ SFS differential (Unix)
179+
if: runner.os != 'Windows'
180+
run: >-
181+
uv run --project oracle/python python oracle/run_sfs_differential.py
182+
--cpp-cli build/native/debug/cpp/axklib
183+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
184+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
185+
186+
- name: Python/C++ SFS differential (Windows)
187+
if: runner.os == 'Windows'
188+
run: >-
189+
uv run --project oracle/python python oracle/run_sfs_differential.py
190+
--cpp-cli build/native/debug/cpp/axklib.exe
191+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
192+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
193+
194+
- name: Python/C++ object differential (Unix)
195+
if: runner.os != 'Windows'
196+
run: |
197+
uv run --project oracle/python python oracle/generate_current_object_fixture.py --output build/native-oracle/current-objects.hds
198+
uv run --project oracle/python python oracle/run_object_differential.py \
199+
--cpp-cli build/native/debug/cpp/axklib \
200+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds \
201+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds \
202+
build/native-oracle/current-objects.hds
203+
204+
- name: Python/C++ object differential (Windows)
205+
if: runner.os == 'Windows'
206+
run: |
207+
uv run --project oracle/python python oracle/generate_current_object_fixture.py --output build/native-oracle/current-objects.hds
208+
uv run --project oracle/python python oracle/run_object_differential.py `
209+
--cpp-cli build/native/debug/cpp/axklib.exe `
210+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds `
211+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds `
212+
build/native-oracle/current-objects.hds
213+
214+
- name: Python/C++ semantic differential (Unix)
215+
if: runner.os != 'Windows'
216+
run: |
217+
uv run --project oracle/python python oracle/run_semantic_differential.py \
218+
--cpp-cli build/native/debug/cpp/axklib \
219+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds \
220+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds \
221+
build/native-oracle/current-objects.hds
222+
223+
- name: Python/C++ semantic differential (Windows)
224+
if: runner.os == 'Windows'
225+
run: |
226+
uv run --project oracle/python python oracle/run_semantic_differential.py `
227+
--cpp-cli build/native/debug/cpp/axklib.exe `
228+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds `
229+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds `
230+
build/native-oracle/current-objects.hds
231+
232+
- name: Python/C++ exact WAV differential (Unix)
233+
if: runner.os != 'Windows'
234+
run: >-
235+
uv run --project oracle/python python oracle/run_audio_differential.py
236+
--cpp-cli build/native/debug/cpp/axklib
237+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
238+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
239+
build/native-oracle/current-objects.hds
240+
241+
- name: Python/C++ exact WAV differential (Windows)
242+
if: runner.os == 'Windows'
243+
run: >-
244+
uv run --project oracle/python python oracle/run_audio_differential.py
245+
--cpp-cli build/native/debug/cpp/axklib.exe
246+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
247+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
248+
build/native-oracle/current-objects.hds
249+
250+
- name: Generate stereo export input
251+
run: >-
252+
uv run --project oracle/python python oracle/generate_stereo_export_fixture.py
253+
--output build/native-oracle/stereo-export.hds
254+
255+
- name: Python/C++ structured audio and SFZ differential (Unix)
256+
if: runner.os != 'Windows'
257+
run: >-
258+
uv run --project oracle/python python oracle/run_structured_audio_differential.py
259+
--cpp-cli build/native/debug/cpp/axklib
260+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
261+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
262+
build/native-oracle/current-objects.hds
263+
build/native-oracle/stereo-export.hds
264+
265+
- name: Python/C++ structured audio and SFZ differential (Windows)
266+
if: runner.os == 'Windows'
267+
run: >-
268+
uv run --project oracle/python python oracle/run_structured_audio_differential.py
269+
--cpp-cli build/native/debug/cpp/axklib.exe
270+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
271+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
272+
build/native-oracle/current-objects.hds
273+
build/native-oracle/stereo-export.hds
274+
275+
- name: Python/C++ preview differential (Unix)
276+
if: runner.os != 'Windows'
277+
run: >-
278+
uv run --project oracle/python python oracle/run_preview_differential.py
279+
--cpp-cli build/native/debug/cpp/axklib
280+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
281+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
282+
build/native-oracle/stereo-export.hds
283+
284+
- name: Python/C++ preview differential (Windows)
285+
if: runner.os == 'Windows'
286+
run: >-
287+
uv run --project oracle/python python oracle/run_preview_differential.py
288+
--cpp-cli build/native/debug/cpp/axklib.exe
289+
tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
290+
tests/fixtures/images/sampler-authored/HD00_512_multi_sbnk_authored.hds
291+
build/native-oracle/stereo-export.hds
292+
293+
- name: Remaining Python/C++ differential matrix (Unix)
294+
if: runner.os != 'Windows'
295+
run: >-
296+
uv run --project oracle/python python oracle/run_remaining_differential.py
297+
--cpp-cli build/native/debug/cpp/axklib
298+
--fixture tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
299+
--output-dir build/native-oracle/remaining
300+
301+
- name: Remaining Python/C++ differential matrix (Windows)
302+
if: runner.os == 'Windows'
303+
run: >-
304+
uv run --project oracle/python python oracle/run_remaining_differential.py
305+
--cpp-cli build/native/debug/cpp/axklib.exe
306+
--fixture tests/fixtures/images/sampler-authored/HD00_512_single_sbnk_authored.hds
307+
--output-dir build/native-oracle/remaining
308+
309+
python:
310+
env:
311+
PYTHONPATH: ${{ github.workspace }}/oracle/python
312+
runs-on: ubuntu-latest
313+
steps:
314+
- uses: actions/checkout@v4
315+
- uses: actions/setup-python@v5
316+
with:
317+
python-version: "3.13"
318+
- uses: astral-sh/setup-uv@v5
319+
with:
320+
enable-cache: true
321+
- run: uv sync --project oracle/python --locked --all-groups
322+
- run: uv run --project oracle/python ruff check oracle/python/axklib oracle/python/tests oracle
323+
- run: cd oracle/python && uv run mypy --explicit-package-bases axklib
324+
- run: uv run --project oracle/python pytest oracle/python/tests
325+
- run: uv run --project oracle/python --group docs mkdocs build --strict
326+
- run: python oracle/check_production_boundary.py .

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
with:
2424
enable-cache: true
2525

26-
- run: uv sync --group docs --locked
27-
- run: uv run --group docs axklib-docs gh-deploy --force
26+
- run: uv sync --project oracle/python --group docs --locked
27+
- run: uv run --project oracle/python --group docs mkdocs gh-deploy --force

0 commit comments

Comments
 (0)