ci: unpack ocio-sys before patching yaml-cpp; fix oakaudio test compile

- cargo fetch does not extract sources; the yaml-cpp <cstdint> patch
  now untars the .crate into the registry src dir first (the glob
  found nothing and the step failed with exit 2)
- oakaudio: the watchdog-wrapped audio test called Self::... from a
  free-function test module (compile error in lib test)
This commit is contained in:
2026-08-21 02:40:44 +08:00
parent d5b8cd99d6
commit 2d4342ff48
3 changed files with 16 additions and 3 deletions
+7
View File
@@ -289,7 +289,14 @@ jobs:
# configure would ignore a CXXFLAGS-only fix).
echo "OCIO_RS_ENABLE_REAL=1" >> "$GITHUB_ENV"
echo "OCIO_RS_LINK=static" >> "$GITHUB_ENV"
# cargo fetch only downloads the .crate archives; unpack ocio-sys
# so the vendored yaml-cpp can be patched before the build.
cargo fetch --locked
for dir in "$HOME"/.cargo/registry/src/*/; do
if ls "$HOME"/.cargo/registry/cache/*/ocio-sys-0.2.1.crate >/dev/null 2>&1; then
tar xzf "$HOME"/.cargo/registry/cache/*/ocio-sys-0.2.1.crate -C "$dir" 2>/dev/null || true
fi
done
for f in "$HOME"/.cargo/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp; do
grep -q '#include <cstdint>' "$f" || \
sed -i '0,/#include/s||#include <cstdint>\n&|' "$f"
+7
View File
@@ -125,7 +125,14 @@ jobs:
# configure would ignore a CXXFLAGS-only fix).
echo "OCIO_RS_ENABLE_REAL=1" >> "$GITHUB_ENV"
echo "OCIO_RS_LINK=static" >> "$GITHUB_ENV"
# cargo fetch only downloads the .crate archives; unpack ocio-sys
# so the vendored yaml-cpp can be patched before the build.
cargo fetch --locked
for dir in "$HOME"/.cargo/registry/src/*/; do
if ls "$HOME"/.cargo/registry/cache/*/ocio-sys-0.2.1.crate >/dev/null 2>&1; then
tar xzf "$HOME"/.cargo/registry/cache/*/ocio-sys-0.2.1.crate -C "$dir" 2>/dev/null || true
fi
done
for f in "$HOME"/.cargo/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp; do
grep -q '#include <cstdint>' "$f" || \
sed -i '0,/#include/s||#include <cstdint>\n&|' "$f"
+2 -3
View File
@@ -505,7 +505,7 @@ mod tests {
// state, so detaching a wedged thread is safe here.
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
Self::output_callback_body();
output_callback_body();
let _ = tx.send(());
});
if rx
@@ -518,8 +518,7 @@ mod tests {
}
/// The test body (see the wrapping test for the watchdog rationale).
fn output_callback_body() {
// Skip when the audio system cannot actually run a stream: open a
fn output_callback_body() { // Skip when the audio system cannot actually run a stream: open a
// silent stream and require at least one callback within 2 s. A
// device existing is not enough — headless sessions report the
// stream running while delivering zero callbacks.