Build pinned V4 Windows foundation #65
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: OBS Plugin Windows | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build Windows x64 plugin | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install OBS Studio 32.2.1 | |
| shell: powershell | |
| run: | | |
| $url = "https://github.com/obsproject/obs-studio/releases/download/32.2.1/OBS-Studio-32.2.1-Windows-x64.zip" | |
| $archive = "$env:RUNNER_TEMP\obs-studio.zip" | |
| $destination = "$env:RUNNER_TEMP\obs-studio" | |
| & curl.exe -L --fail --retry 3 -o $archive $url | |
| if ($LASTEXITCODE -ne 0) { throw "OBS Studio download failed" } | |
| $actual = (Get-FileHash $archive -Algorithm SHA256).Hash.ToLowerInvariant() | |
| $expected = "db64a2934f8261f85b1410b84be011207a0afda5400d008289f1f1e211bcc7de" | |
| if ($actual -ne $expected) { throw "OBS Studio checksum mismatch" } | |
| Expand-Archive -Path $archive -DestinationPath $destination | |
| "OPENSTREAM_OBS_INSTALL=$destination" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Install matching Qt development files | |
| shell: powershell | |
| run: | | |
| python -m pip install --disable-pip-version-check aqtinstall | |
| python -m aqt install-qt windows desktop 6.8.3 win64_msvc2022_64 -O C:\Qt | |
| "OPENSTREAM_QT_ROOT=C:\Qt\6.8.3\msvc2022_64" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Build plugin package | |
| shell: cmd | |
| run: | | |
| set OPENSTREAM_SKIP_INSTALL=1 | |
| set OPENSTREAM_PLUGIN_PACKAGE_DIR=%CD%\artifacts | |
| call build_plugin.bat | |
| - name: Verify OBS 32 FFmpeg ABI dependencies | |
| shell: powershell | |
| run: | | |
| $dll = "$PWD\obs-plugin\build\openstream-obs.dll" | |
| $vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | |
| $dumpbin = Get-ChildItem "$vs\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" | Sort-Object FullName -Descending | Select-Object -First 1 | |
| if (!$dumpbin) { throw "dumpbin.exe was not found" } | |
| $deps = (& $dumpbin.FullName /dependents $dll) -join "`n" | |
| 'avformat-62.dll','avcodec-62.dll','avutil-60.dll','swscale-9.dll' | ForEach-Object { if ($deps -notmatch [regex]::Escape($_)) { throw "Missing expected dependency $_" } } | |
| 'avformat-61.dll','avcodec-61.dll','avutil-59.dll','swscale-8.dll' | ForEach-Object { if ($deps -match [regex]::Escape($_)) { throw "Obsolete dependency $_" } } | |
| - name: Verify ZIP migration package | |
| shell: powershell | |
| run: | | |
| Expand-Archive artifacts\openstream-obs-windows-x64.zip "$env:RUNNER_TEMP\openstream-zip" | |
| $stage = "$env:RUNNER_TEMP\openstream-zip" | |
| if (!(Test-Path "$stage\openstream-obs.dll")) { throw 'ZIP is missing canonical DLL' } | |
| & tools\installer\Test-OpenStreamPackage.ps1 -ZipPath "$PWD\artifacts\openstream-obs-windows-x64.zip" | |
| - name: Install Inno Setup | |
| shell: powershell | |
| run: choco install innosetup -y --no-progress | |
| - name: Build plugin installer | |
| shell: powershell | |
| env: | |
| OPENSTREAM_VERSION: ci | |
| run: | | |
| $iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" | |
| & $iscc "tools\installer\openstream-obs-plugin.iss" ` | |
| "/DPluginDll=$PWD\obs-plugin\build\openstream-obs.dll" ` | |
| "/DOutputDir=$PWD\artifacts" ` | |
| "/DOutputBaseFilename=openstream-obs-plugin-installer-windows-x64" ` | |
| "/DOpenStreamVersion=$env:OPENSTREAM_VERSION" | |
| - name: Smoke-test executable installer migration | |
| shell: powershell | |
| run: | | |
| & tools\installer\Test-OpenStreamInnoInstaller.ps1 ` | |
| -InstallerPath "$PWD\artifacts\openstream-obs-plugin-installer-windows-x64.exe" | |
| - name: Upload plugin package and installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openstream-obs-windows-x64 | |
| path: | | |
| artifacts/openstream-obs-windows-x64.zip | |
| artifacts/openstream-obs-plugin-installer-windows-x64.exe | |
| if-no-files-found: error | |