diff --git a/.github/scripts/Build-Windows.ps1 b/.github/scripts/Build-Windows.ps1 index 425265f6b..79914c203 100644 --- a/.github/scripts/Build-Windows.ps1 +++ b/.github/scripts/Build-Windows.ps1 @@ -1,6 +1,6 @@ [CmdletBinding()] param( - [ValidateSet('x64')] + [ValidateSet('x64', 'arm64')] [string] $Target = 'x64', [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [string] $Configuration = 'RelWithDebInfo' @@ -53,6 +53,15 @@ function Build { Ensure-Location $ProjectRoot $CmakeArgs = @('--preset', "windows-ci-${Target}") + + # Required at the very least until OBS Studio updates to Qt 6.8+, pending review of Qt's build options for + # Windows ARM64. + if ( $Target -eq 'arm64' ) { + $QtDependencyVersion = $BuildSpec.dependencies.qt6.version + + $CmakeArgs += @("-DQT_HOST_PATH=${ProjectRoot}\.deps\obs-deps-qt6-${QtDependencyVersion}-x64") + } + $CmakeBuildArgs = @('--build') $CmakeInstallArgs = @() diff --git a/.github/scripts/Package-Windows.ps1 b/.github/scripts/Package-Windows.ps1 index d175af00c..5c68533b8 100644 --- a/.github/scripts/Package-Windows.ps1 +++ b/.github/scripts/Package-Windows.ps1 @@ -1,6 +1,6 @@ [CmdletBinding()] param( - [ValidateSet('x64')] + [ValidateSet('x64', 'arm64')] [string] $Target = 'x64', [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [string] $Configuration = 'RelWithDebInfo' @@ -71,8 +71,8 @@ function Package { cpack @CpackArgs - $Package = Get-ChildItem -filter "obs-studio-*-windows-x64.zip" -File - Move-Item -Path $Package -Destination "${OutputName}-windows-x64.zip" + $Package = Get-ChildItem -filter "obs-studio-*-windows-${Target}.zip" -File + Move-Item -Path $Package -Destination "${OutputName}-windows-${Target}.zip" Pop-Location -Stack PackageTemp } diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index 190c79879..73351452e 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -329,6 +329,9 @@ jobs: windows-build: name: Windows 🪟 + strategy: + matrix: + architecture: [x64, arm64] runs-on: windows-2022 needs: check-event defaults: @@ -353,18 +356,18 @@ jobs: YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }} GPU_PRIORITY_VAL: ${{ secrets.GPU_PRIORITY_VAL }} with: - target: x64 + target: ${{ matrix.architecture }} config: ${{ needs.check-event.outputs.config }} - name: Package OBS Studio 📀 uses: ./.github/actions/package-obs with: - target: x64 + target: ${{ matrix.architecture }} config: ${{ needs.check-event.outputs.config }} package: ${{ fromJSON(needs.check-event.outputs.package) }} - name: Upload Artifacts 📡 uses: actions/upload-artifact@v4 with: - name: obs-studio-windows-x64-${{ needs.check-event.outputs.commitHash }} - path: ${{ github.workspace }}/build_x64/obs-studio-*-windows-x64.zip + name: obs-studio-windows-${{ matrix.architecture }}-${{ needs.check-event.outputs.commitHash }} + path: ${{ github.workspace }}/build_${{ matrix.architecture }}/obs-studio-*-windows-${{ matrix.architecture }}.zip