Skip to content

ci: cross-build macOS Tier 2 artifacts on Linux; run CTest and native contracts on macOS #5009

Open

Description

@zackees

The maintainer directed on 2026-11-17 that hosted macOS runners execute Linux-built binaries. Phase 1 is #5008 (Rust category artifacts). This follow-up moves rust-tier2-macos compilation to Linux and leaves CTest plus the Cargo-native core contract execution on macOS.

Build hybrid libobs and the C reference, every cmocka/Rust-static fixture and the native contract with soldr's LLVM + Apple SDK using cmake/cross mac-arm64. Transfer a manifest, dylibs, signed arm64 executables, generated test data and the full CTest registry. Execute all existing OFF/ON suites and native-core assertions on macOS. Preserve the check name, scope, ABI/export comparison and fail-closed CI Gate. Coordinate with #5005's aggregate native roots.

Blockers found in source inspection:

  • cmake/cross/CMakeLists.txt:220 builds one optional hybrid shared libobs; it does not construct the reference backend or cmocka/CTest/native-contract graph. Its default is objects only.
  • Cocoa/Objective-C/Objective-C++ need ARC, modules and target-specific options. The real native graph also includes Metal/shader compilation; Apple tool executables cannot run on Linux. Inventory the selected test closure before deciding which Metal outputs must be shipped/prebuilt.
  • Frameworks and dependency dylibs must resolve against the blessed SDK and pinned macOS prebuilt dependencies, without leaking Linux host libraries. cmake/cross/CMakeLists.txt:329 names AppKit, AudioToolbox, AudioUnit, Carbon, Cocoa, CoreAudio and IOKit.
  • The native macOS harness uses Xcode. Use Ninja/toolchain files for Linux generation, and preserve both backend registries, CTest properties, configurations and generated data instead of transferring an unusable Xcode build tree.
  • Install names, @rpath/@loader_path, CTest absolute source/build paths and generated source paths need a documented common-path or relocation contract.
  • Every arm64 Mach-O executable/dylib needs a valid ad-hoc code signature after its final link/relocation. Verify CodeDirectory page hashes on Linux; verify loading on macOS.
  • The native contract and ordinary Application category include tests that compile and mutate C/C++/ObjC fixtures at test runtime (rust/obs-build/tests/native.rs, e.g. native_profile_switch_rebuilds_assertion_policy and mixed_objective_languages_compile_load_and_rebuild_with_unity_and_pch). A no-run Rust build does not prepare these artifacts. Separate build/rebuild preparation on Linux from runtime assertions on macOS without dropping incremental-rebuild/loader assertions.

Acceptance: local RED/GREEN CI self-tests for manifest completeness, runtime environment/loader paths, artifact absence and nonzero status; actual signed mac-arm64 cross-build; unchanged C tests and headers; hosted execution of both backends/native contract with timing and runner-minute comparison. No new workflow file and no application-release packaging change.

Activity

  1. zackees commented on Nov 17, 2026

    @zackees
    MemberAuthor

    Claiming: investigation and branch-only macOS Tier 2 cross-build prototype in pool slot obs-studio2. 1. Inventory the complete native graph and four execution passes. 2. Extend the Linux mac-arm64 link and prepare relocatable artifacts with RED/GREEN infrastructure self-tests, reusing #5008 helpers. 3. Record cross-link/runtime blockers and lint evidence; publish a PR only when green and backpressure admits it. Maintainer assignment is strict run-only; the hosted job remains unchanged until every existing assertion can execute from prebuilt artifacts. Waiting for #5005 to merge before consuming its aggregate root.

  2. added
    needs-investigation
    on Nov 17, 2026
  3. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Blocked: completing the run-only macOS Tier 2 bundle requires matching Darwin compiler-rt runtimes, an approved Linux-hosted Swift/Darwin toolchain, and splitting the existing runtime compiler fixtures. Preserved the branch-only prototype at ci/macos-tier2-run-only, head 581c7db5d88d943da235cfa16ca626b867fa62c1. No PR or workflow activation.

    The branch incorporates landed #5005/master fd4412dcb and explicitly depends on #5008 helper commit 1d8822d66ee3b38d0754e8da843d4efb03836a4f; the shared manifest and CodeDirectory verifier are reused.

    Actual Linux results on the final base: both arm64 core frameworks link and have identical sets of 1,904 exports; unchanged test_bitstream and a standalone Rust-static fixture link. All 15 staged core/test/dependency images pass ad-hoc signature page verification and contain only system absolute loader paths. The libobs-integration native-contract executable was separately prebuilt, staged by the #5008 collector and signature-verified. 44 focused self-tests pass, including aggregate/shared-support checks. Full inventory staging rejects the first absent executable; incomplete manifests refuse execution.

    The selected registry has 631 tests, versus 656 in the supplied native baseline (30 missing owner-closure names and five newer tests); it cannot replace any full pass yet. The registered test_core_module_manifest_source configures/builds a fixture during every pass, independently of the Cargo-native contract's runtime builds. A direct sanitizer probe fails to link because soldr LLVM lacks libclang_rt.asan_osx_dynamic.dylib. Nothing was disabled to accommodate these gaps.

    Full ./lint ran once and failed the CI-test import rule. The import was corrected; the failed rule plus focused regressions pass under Python 3.14. Full lint was not repeated under the pool's one-full-run rule; remaining Rust lint stages and hosted macOS execution are unverified. Backpressure was open (exit 0, headroom 3), but the prototype is held because full coverage/validation is incomplete.

    Inventory, root/path strategy and fixes for each blocker: https://github.com/obs-rust/obs-studio/blob/ci/macos-tier2-run-only/docs/ci/macos-tier2/inventory.md

  4. added
    claim-blocked
    on Nov 18, 2026
  5. 189 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-investigation

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions