[ci] Vendor RADE Opus snapshot for offline builds#1151
Conversation
There was a problem hiding this comment.
Good work on this — the approach is clean and the motivation is solid. Removing the fragile pre-cache CI workaround in favour of a fully offline build is the right call. A few notes:
BuildOpus.cmake — CMake variable names for DRED/OSCE
The old autotools path used --enable-osce --enable-dred. The new path uses -DOPUS_DRED=ON -DOPUS_OSCE=ON. These match the variable names in Opus's CMakeLists from around the pinned commit (940d4e5), so they should be correct — but it's worth a quick sanity check against third_party/opus-rade's extracted CMakeLists.txt if you hit unexpected link errors on a clean build. This is the only point I'd verify if CI hasn't run the full matrix yet.
macOS universal — lipo paths
The old code referenced .libs/libopus.a (autotools output convention). The new code references <BINARY_DIR>/libopus.a (CMake ExternalProject convention). That's correct for the CMake build. The DEPENDS build_opus_arm build_opus_x86 wiring on the add_custom_command looks right.
Cross-compilation
The old code forwarded --host=${CMAKE_C_COMPILER_TARGET} to autotools. The new code passes CMAKE_TOOLCHAIN_FILE and CMAKE_C_COMPILER — which is the correct idiom for CMake-based cross builds. Looks fine.
Binary size
The 51 MB archive in git is acknowledged in the PR description. It's below GitHub's hard limit. One thing to consider for the future: a .gitattributes entry marking the .tar.gz as binary (-diff -merge) prevents git from attempting text diffs on it and can make git log -p less noisy. Not blocking, just a quality-of-life suggestion.
SHA256 verification
URL_HASH on the ExternalProject_Add calls is good — any corrupted or replaced archive will fail loudly at CMake configure time rather than producing a subtly broken build.
Scope
All 11 changed files are within the stated scope. No C++ source changes; the review checklist for AetherSDR conventions (AppSettings, RAII, C++20) doesn't apply here.
Overall this is ready to go once the maintainer is satisfied with CI results. Thanks for the contribution, @jensenpat!
Summary
This PR vendors the pinned RADE Opus snapshot into the repository and updates the RADE build to consume that local snapshot instead of downloading Opus and its neural model at build time.
It also removes the CI and Docker model pre-cache workaround that existed only to reduce flakiness from those network fetches.
What changed
third_party/opus-rade/third_party/radae/cmake/BuildOpus.cmaketo build from the vendored archive via CMake instead of downloading upstream Opus during the buildPatchOpusNnet.cmakeas a refresh helper for updating the vendored snapshot, not as a normal build stepWhy
The old RADE path depended on build-time network downloads.
That created two recurring problems:
Vendoring the exact pinned snapshot keeps behavior deterministic while removing the network dependency from normal builds.
Benefits
67.16swall-clock when run with unrestricted network access, while the vendored build completed in53.34s, a13.82simprovement or about20.6%faster on the test machine.build_opusdownload step after86.11s; the vendored path completed fully offline.Validation
cmake -B build-vendor-test -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfocmake --build build-vendor-test --target build_opus -j4cmake --build build-vendor-test -j4cmake -B build-no-rade-test -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_RADE=OFFcmake --build build-no-rade-test -j4HEAD:cmake -B build-bench -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build-bench -j4cmake -B build-bench-current -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build-bench-current -j4Tradeoffs
51 MBbecause the prepared Opus snapshot is now stored locally50 MBfile size threshold, although it is still below the hard file size limit👨🏼💻 Generated with OpenAI Codex (GPT-5.3 Pro) and tested by @jensenpat