diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7906edaa7..45b971e15 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 ) — 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 ' "$f" || \ - sed -i '0,/#include/s||#include \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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5302bbf6e..32ca30634 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 ) — 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 ' "$f" || \ - sed -i '0,/#include/s||#include \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 diff --git a/crates/oak-worker/src/worker.rs b/crates/oak-worker/src/worker.rs index e727be7c4..92a315ef9 100644 --- a/crates/oak-worker/src/worker.rs +++ b/crates/oak-worker/src/worker.rs @@ -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);