ci: Windows uses the MSYS2 OpenColorIO (2.5.2, dynamic); test diagnostics

- the vendored OCIO source needs MSVC-only constructs (wide-path
  ifstream); MSYS2's mingw build of the exact 2.5.2 the bridge targets
  is the sane Windows path — DLLs get packaged next to the binaries
- oak-worker handshake test prints the error response on failure
  (CI-only attach failure needs the message)
This commit is contained in:
2026-08-21 05:17:54 +08:00
parent f6a7dfd0b3
commit 738120bffc
3 changed files with 19 additions and 60 deletions
+6 -29
View File
@@ -277,40 +277,17 @@ jobs:
bash tooling/install-deps.sh
pacman -S --needed --noconfirm \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-opencolorio \
mingw-w64-ucrt-x86_64-librsvg
- name: Configure build environment
run: |
# OCIO comes from the ocio-sys vendored source build (same on
# every platform); no OCIO_INSTALL_DIR override.
# The vendored yaml-cpp predates GCC 13's transitive-include
# cleanup (uint16_t/uint32_t used without <cstdint>) — patch the
# include into the registry copy (idempotent; a cached cmake
# configure would ignore a CXXFLAGS-only fix).
# Windows uses the MSYS2 OpenColorIO package (the exact 2.5.2 the
# bridge targets; the vendored source needs MSVC-only constructs).
# Dynamic; the DLLs are packaged next to the binaries.
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. The
# registry src dir may not exist yet on a fresh runner — create
# it from the cache dir's hash. The trailing ls asserts the
# patched file actually exists.
# rust-toolchain sets CARGO_HOME to the WINDOWS userprofile
# path ($USERPROFILE\.cargo), not the msys2 $HOME — resolve it.
CH=$(cygpath -u "${CARGO_HOME:-$HOME/.cargo}")
cargo fetch --locked
for cache in "$CH"/registry/cache/*/; do
src="$CH/registry/src/$(basename "$cache")"
mkdir -p "$src"
if [ -f "$cache/ocio-sys-0.2.1.crate" ]; then
tar xzf "$cache/ocio-sys-0.2.1.crate" -C "$src"
fi
done
for f in "$CH"/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp; do
[ -e "$f" ] || continue
grep -q '#include <cstdint>' "$f" || \
sed -i '0,/#include/s||#include <cstdint>\n&|' "$f"
done
ls "$CH"/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp
echo "OCIO_INSTALL_DIR=/ucrt64" >> "$GITHUB_ENV"
echo "OCIO_RS_LINK=dynamic" >> "$GITHUB_ENV"
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
+8 -30
View File
@@ -83,7 +83,9 @@ jobs:
shell: msys2 {0}
run: |
bash tooling/install-deps.sh
pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-cmake
pacman -S --needed --noconfirm \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-opencolorio
# ------------------------------------------------------------------
# Build environment
@@ -117,36 +119,12 @@ jobs:
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
# OCIO comes from the ocio-sys vendored source build (same on
# every platform); no OCIO_INSTALL_DIR override.
# The vendored yaml-cpp predates GCC 13's transitive-include
# cleanup (uint16_t/uint32_t used without <cstdint>) — patch the
# include into the registry copy (idempotent; a cached cmake
# configure would ignore a CXXFLAGS-only fix).
# Windows uses the MSYS2 OpenColorIO package (the exact 2.5.2 the
# bridge targets; the vendored source needs MSVC-only constructs).
# Dynamic here — the CD packages the DLLs next to the binaries.
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. The
# registry src dir may not exist yet on a fresh runner — create
# it from the cache dir's hash. The trailing ls asserts the
# patched file actually exists.
# rust-toolchain sets CARGO_HOME to the WINDOWS userprofile
# path ($USERPROFILE\.cargo), not the msys2 $HOME — resolve it.
CH=$(cygpath -u "${CARGO_HOME:-$HOME/.cargo}")
cargo fetch --locked
for cache in "$CH"/registry/cache/*/; do
src="$CH/registry/src/$(basename "$cache")"
mkdir -p "$src"
if [ -f "$cache/ocio-sys-0.2.1.crate" ]; then
tar xzf "$cache/ocio-sys-0.2.1.crate" -C "$src"
fi
done
for f in "$CH"/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp; do
[ -e "$f" ] || continue
grep -q '#include <cstdint>' "$f" || \
sed -i '0,/#include/s||#include <cstdint>\n&|' "$f"
done
ls "$CH"/registry/src/*/ocio-sys-0.2.1/vendor/OpenColorIO/ext/ocio-rs-deps/yaml-cpp/src/emitterutils.cpp
echo "OCIO_INSTALL_DIR=/ucrt64" >> "$GITHUB_ENV"
echo "OCIO_RS_LINK=dynamic" >> "$GITHUB_ENV"
# ------------------------------------------------------------------
# Caches
+5 -1
View File
@@ -1471,7 +1471,11 @@ mod tests {
let mut s = WorkerSession::create("none").unwrap();
let (hs, _out, _in) = parent_side(2, 256, true);
let resp = s.handle_line(&hs.to_string()).expect("hello_caps response");
assert_eq!(resp["type"], crate::ipc::TYPE_HELLO_CAPS);
assert_eq!(
resp["type"],
crate::ipc::TYPE_HELLO_CAPS,
"handshake failed: {resp}"
);
assert!(s.input_pool.is_some());
let in_pool = s.input_pool.as_ref().unwrap();
assert_eq!(in_pool.slot_count(), 2);