fix(docs): update Visual Studio version and clarify latency descripti… #186
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| jobs: | |
| linux-x64: | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake pkg-config \ | |
| libobs-dev \ | |
| libavformat-dev libavcodec-dev libswresample-dev \ | |
| libavfilter-dev libswscale-dev libavutil-dev | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: obs-irl-source-linux-x64 | |
| path: build/obs-irl-source.so | |
| windows-x64: | |
| runs-on: windows-2025-vs2026 | |
| env: | |
| OBS_VERSION: "32.1.2" | |
| OBS_DEPS_VERSION: "2026-06-25" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Cache OBS build | |
| id: cache-obs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| obs-src | |
| obs-deps | |
| key: obs-build-${{ env.OBS_VERSION }}-${{ env.OBS_DEPS_VERSION }}-v2 | |
| - name: Download OBS dependencies | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| Invoke-WebRequest ` | |
| -Uri "https://github.com/obsproject/obs-deps/releases/download/${{ env.OBS_DEPS_VERSION }}/windows-deps-${{ env.OBS_DEPS_VERSION }}-x64.zip" ` | |
| -OutFile obs-deps.zip | |
| Expand-Archive obs-deps.zip -DestinationPath obs-deps | |
| - name: Clone OBS source | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| run: git clone --depth 1 --branch ${{ env.OBS_VERSION }} https://github.com/obsproject/obs-studio.git obs-src | |
| - name: Patch OBS to build only libobs | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| # Keep only libobs + w32-pthreads, remove all other subdirectories | |
| # (plugins, frontend, renderers, tests) | |
| $lines = Get-Content obs-src/CMakeLists.txt | |
| $output = @() | |
| $done = $false | |
| foreach ($line in $lines) { | |
| if ($done) { continue } | |
| if ($line -match '^\s*add_subdirectory\(libobs\)\s*$') { | |
| $output += 'add_subdirectory(deps/w32-pthreads)' | |
| $output += $line | |
| $done = $true | |
| } else { | |
| $output += $line | |
| } | |
| } | |
| $output | Set-Content obs-src/CMakeLists.txt | |
| # Disable automatic dependency download (we provide deps via CMAKE_PREFIX_PATH) | |
| (Get-Content obs-src/cmake/windows/defaults.cmake) ` | |
| -replace '^include\(buildspec\)', '# include(buildspec)' | | |
| Set-Content obs-src/cmake/windows/defaults.cmake | |
| # Skip multi-architecture subprocess builds (OBS normally launches | |
| # a child cmake for x86 which would fail in our stripped-down tree) | |
| @" | |
| include_guard(GLOBAL) | |
| include(compilerconfig) | |
| if(NOT DEFINED OBS_PARENT_ARCHITECTURE) | |
| set(OBS_PARENT_ARCHITECTURE `${CMAKE_VS_PLATFORM_NAME}) | |
| endif() | |
| "@ | Set-Content obs-src/cmake/windows/architecture.cmake | |
| - name: Configure OBS | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| shell: cmd | |
| run: > | |
| cmake -S obs-src -B obs-src/build | |
| -G "Visual Studio 18 2026" -A x64 | |
| -DCMAKE_PREFIX_PATH=%CD%\obs-deps | |
| -DENABLE_UI=OFF | |
| -DENABLE_PLUGINS=OFF | |
| - name: Build OBS (libobs only) | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| shell: cmd | |
| run: cmake --build obs-src/build --config Release --target libobs --target w32-pthreads | |
| - name: Configure | |
| shell: cmd | |
| run: > | |
| cmake -B build | |
| -G "Visual Studio 18 2026" -A x64 | |
| -DOBS_SOURCE_DIR=%CD%\obs-src | |
| -DFFMPEG_DIR=%CD%\obs-deps | |
| - name: Build | |
| shell: cmd | |
| run: cmake --build build --config RelWithDebInfo --parallel | |
| - name: Collect runtime dependencies | |
| shell: pwsh | |
| run: | | |
| # Copy w32-pthreads.dll next to the plugin | |
| $w32dll = Get-ChildItem -Path obs-src/build/deps/w32-pthreads -Filter "w32-pthreads.dll" -Recurse | Select-Object -First 1 | |
| if ($w32dll) { | |
| Copy-Item $w32dll.FullName build/RelWithDebInfo/ | |
| } | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: obs-irl-source-windows-x64 | |
| path: | | |
| build/RelWithDebInfo/obs-irl-source.dll | |
| build/RelWithDebInfo/w32-pthreads.dll | |
| macos-arm64: | |
| runs-on: macos-15 | |
| env: | |
| OBS_VERSION: "32.1.2" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install cmake pkg-config ffmpeg simde uthash jansson | |
| - name: Cache OBS build | |
| id: cache-obs | |
| uses: actions/cache@v4 | |
| with: | |
| path: obs-src | |
| key: obs-macos-arm64-${{ env.OBS_VERSION }}-v1 | |
| - name: Clone OBS source | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| run: git clone --depth 1 --branch ${{ env.OBS_VERSION }} https://github.com/obsproject/obs-studio.git obs-src | |
| - name: Patch OBS to build only libobs | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| run: | | |
| # Truncate CMakeLists.txt after add_subdirectory(libobs) | |
| sed -i '' '/^add_subdirectory(libobs)/q' obs-src/CMakeLists.txt | |
| # Disable automatic dependency download | |
| sed -i '' 's/^include(buildspec)/# include(buildspec)/' obs-src/cmake/macos/defaults.cmake | |
| # Allow Homebrew paths (OBS blocks them by default) | |
| sed -i '' '/CMAKE_IGNORE_PREFIX_PATH/d' obs-src/cmake/macos/defaults.cmake | |
| - name: Configure OBS | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| run: > | |
| cmake -S obs-src -B obs-src/build | |
| -G Xcode | |
| -DENABLE_UI=OFF | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 | |
| -DCMAKE_PREFIX_PATH="$(brew --prefix)" | |
| - name: Build OBS (libobs only) | |
| if: steps.cache-obs.outputs.cache-hit != 'true' | |
| run: cmake --build obs-src/build --config Release --target libobs --parallel | |
| - name: Configure | |
| run: > | |
| cmake -B build | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| -DOBS_SOURCE_DIR=$PWD/obs-src | |
| -DCMAKE_C_FLAGS="-I$(brew --prefix)/include" | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: obs-irl-source-macos-arm64 | |
| path: build/obs-irl-source.so |