Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build upmerged #620

Open
wants to merge 8 commits into
base: streamlabs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/actions/package-obs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ runs:
${{ inputs.workingDirectory }}/.github/scripts/package-ubuntu ${package_args}

- name: Run Windows packaging
if: runner.os == 'Windows'
if: runner.os == 'Windows' && github.repository == 'obsproject/obs-studio'
shell: pwsh
working-directory: ${{ inputs.workingDirectory }}
run: |
Expand All @@ -112,3 +112,11 @@ runs:
}

.github/scripts/Package-windows.ps1 @PackageArgs

- name: Run Windows lib packaging
if: runner.os == 'Windows'
shell: pwsh
working-directory: ${{ inputs.workingDirectory }}
run: 7z a -r ${{env.TARGET_ARTIFACT}}.7z ${{env.InstallPath}}
env:
TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{env.OS_TAG}}-${{matrix.ReleaseName}}-${{ steps.get_version.outputs.VERSION }}
9 changes: 8 additions & 1 deletion .github/actions/run-clang-format/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,12 @@ runs:

print ::group::Run clang-format-17
local -a changes=(${(s:,:)CHANGED_FILES//[\[\]\'\"]/})
./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check ${changes}
local issues
issues=$(./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check ${changes} || true)

if [[ -n "$issues" ]]; then
echo "::error::clang-format issues found:\n$issues"
else
echo "No formatting issues detected."
fi
print ::endgroup::
53 changes: 53 additions & 0 deletions .github/actions/upload-debug-symbols/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
inputs:
githubWorkspace:
description: "GitHub workspace path."
required: true
repoUserId:
description: "Repository user ID."
required: true
repoName:
description: "Repository name."
required: true
repoBranch:
description: "Repository branch."
required: true
buildConfig:
description: "Build configuration for Sentry upload (macOS only)."
required: false
default: "RelWithDebInfo"
awsSymbAccessKeyId:
description: "AWS Access Key ID used for symbol uploads."
required: false
awsSymbSecretAccessKey:
description: "AWS Secret Access Key used for symbol uploads."
required: false
sentryAuthToken:
description: "Auth token used for Sentry symbol uploads."
required: false

runs:
using: "composite"
steps:
- name: Fetch symsrv-scripts
if: runner.os != 'macOS'
uses: actions/checkout@v3
with:
fetch-depth: 2
repository: ${{ inputs.repoUserId }}/symsrv-scripts
path: symsrv-scripts

- name: Run symbol server scripts
if: runner.os != 'macOS'
shell: powershell
run: ./symsrv-scripts/main.bat "${{ inputs.githubWorkspace }}/symsrv-scripts" ".\main.ps1 -localSourceDir '${{ inputs.githubWorkspace }}' -repo_userId '${{ inputs.repoUserId }}' -repo_name '${{ inputs.repoName }}' -repo_branch '${{ inputs.repoBranch }}' -subModules 'plugins/mediasoup-connector,stream-labs,mediasoup-connector,streamlabs;plugins/enc-amf,stream-labs,obs-amd-encoder,streamlabs;plugins/motion-effect,stream-labs,motion-effect,master;plugins/obs-browser,stream-labs,obs-browser,streamlabs;plugins/obs-ndi,stream-labs,obs-ndi,streamlabs;plugins/obs-ndi,stream-labs,obs-amd-encoder,streamlabs;plugins/obs-openvr,stream-labs,OBS-OpenVR-Input-Plugin,master;plugins/sl-vst,stream-labs,sl-vst,streamlabs;plugins/slobs-virtual-cam,stream-labs,slobs-virtual-cam,streamlabs;plugins/win-dshow/libdshowcapture,stream-labs,libdshowcapture,streamlabs'"
env:
AWS_SYMB_ACCESS_KEY_ID: ${{ inputs.awsSymbAccessKeyId }}
AWS_SYMB_SECRET_ACCESS_KEY: ${{ inputs.awsSymbSecretAccessKey }}

- name: Upload debug files to Sentry (macOS only)
if: runner.os == 'macOS'
shell: python
run: python ./slobs_CI/sentry-osx.py
env:
SENTRY_AUTH_TOKEN: ${{ inputs.sentryAuthToken }}
BUILDCONFIG: ${{ inputs.buildConfig }}
15 changes: 15 additions & 0 deletions .github/scripts/Build-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,21 @@ function Build {
$CmakeArgs = @('--preset', "windows-ci-${Target}")
$CmakeBuildArgs = @('--build')
$CmakeInstallArgs = @()
$CmakeCheckArgs = @('--build')

if ( $DebugPreference -eq 'Continue' ) {
$CmakeArgs += ('--debug-output')
$CmakeBuildArgs += ('--verbose')
$CmakeInstallArgs += ('--verbose')
$CmakeCheckArgs += ('--verbose')
}

$CmakeCheckArgs += @(
"build_${Target}"
'--target', 'check_dependencies',
'--config', $Configuration
)

$CmakeBuildArgs += @(
'--preset', "windows-${Target}"
'--config', $Configuration
Expand All @@ -81,9 +89,16 @@ function Build {
Log-Group "Building obs-studio..."
Invoke-External cmake @CmakeBuildArgs

Log-Group "Chech for changes in dependencies..."
Invoke-External cmake @CmakeCheckArgs

Log-Group "Installing obs-studio..."
Invoke-External cmake @CmakeInstallArgs

Log-Group "Installing Development component..."
$CmakeInstallDevArgs = $CmakeInstallArgs + @('--component', 'Development')
Invoke-External cmake @CmakeInstallDevArgs

Pop-Location -Stack BuildTemp
Log-Group
}
Expand Down
80 changes: 78 additions & 2 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ jobs:
name: obs-studio-macos-${{ matrix.target }}-${{ needs.check-event.outputs.commitHash }}-dSYMs
path: ${{ github.workspace }}/build_macos/obs-studio-*-macos-${{ steps.setup.outputs.cpuName }}-dSYMs.tar.xz

- name: Symbol Server and Sentry Integration
uses: ./.github/actions/upload-debug-symbols
with:
githubWorkspace: ${{ github.workspace }}
repoUserId: stream-labs
repoName: obs-studio
repoBranch: ${{ github.sha }}
buildConfig: RelWithDebInfo

- uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
Expand All @@ -170,6 +179,7 @@ jobs:

ubuntu-build:
name: Ubuntu 🐧
if: github.repository == 'obsproject/obs-studio'
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
Expand Down Expand Up @@ -228,7 +238,7 @@ jobs:

- name: Upload Debug Symbol Artifacts 🪲
uses: actions/upload-artifact@v4
if: ${{ fromJSON(needs.check-event.outputs.package) }}
if: github.repository == 'obsproject/obs-studio' && fromJSON(needs.check-event.outputs.package)
with:
name: obs-studio-${{ matrix.os }}-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
path: ${{ github.workspace }}/build_ubuntu/obs-studio-*-x86_64-ubuntu-gnu-dbgsym.ddeb
Expand All @@ -241,6 +251,7 @@ jobs:

flatpak-build:
name: Flatpak 📦
if: github.repository == 'obsproject/obs-studio'
runs-on: ubuntu-22.04
needs: check-event
defaults:
Expand Down Expand Up @@ -331,6 +342,13 @@ jobs:
name: Windows 🪟
runs-on: windows-2022
needs: check-event
env:
PACKAGE_NAME: libobs
OS_TAG: windows64
InstallDir: "install"
BuildDir: "build_x64"
RELEASE_BUCKET: "obsstudios3.streamlabs.com"
ReleaseName: release
defaults:
run:
shell: pwsh
Expand All @@ -339,7 +357,24 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- name: 'Add msbuild to PATH'
uses: microsoft/setup-msbuild@v1
- name: Install build components
run: |
# For versions update see here: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToInstall= @(
"Microsoft.VisualStudio.Component.VC.v141.x86.x64"
"Microsoft.VisualStudio.Component.VC.14.39.17.9.x86.x64"
"Microsoft.VisualStudio.Component.VC.14.39.17.9.ATL"
)
[string]$workloadArgs = $componentsToInstall | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
shell: powershell
- uses: actions/cache@v4
id: ccache-cache
if: github.event_name == 'pull_request'
Expand All @@ -365,15 +400,56 @@ jobs:
target: x64
config: ${{ needs.check-event.outputs.config }}

- name: Symbol Server and Sentry Integration 🪲
uses: ./.github/actions/upload-debug-symbols
with:
githubWorkspace: ${{ github.workspace }}
repoUserId: stream-labs
repoName: obs-studio
repoBranch: ${{ github.sha }}
buildConfig: RelWithDebInfo
awsSymbAccessKeyId: ${{ secrets.AWS_SYMB_ACCESS_KEY_ID }}
awsSymbSecretAccessKey: ${{ secrets.AWS_SYMB_SECRET_ACCESS_KEY }}
sentryAuthToken: ${{ secrets.SENTRY_AUTH_TOKEN }}

- name: Package OBS Studio 📀
if: github.repository == 'obsproject/obs-studio'
uses: ./.github/actions/package-obs
with:
target: x64
config: ${{ needs.check-event.outputs.config }}
package: ${{ fromJSON(needs.check-event.outputs.package) }}

- name: Upload Artifacts 📡
if: github.repository == 'obsproject/obs-studio'
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: Get the version
id: get_version
run: |
$version = "${{ github.ref }}".Replace("refs/tags/", "")
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Package OBS lib 🗜️
run: |
cd ${{env.BuildDir}}
7z a -r ../${{env.TARGET_ARTIFACT}}.7z ${{env.InstallDir}}
cd ..
env:
TARGET_ARTIFACT: ${{ env.PACKAGE_NAME }}-${{ env.OS_TAG }}-${{ env.ReleaseName }}-${{ steps.get_version.outputs.VERSION }}

- name: Configure AWS credentials
if: startsWith(github.ref, 'refs/tags/')
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}}
aws-secret-access-key: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}}
aws-region: us-west-2
- name: Deploy
if: startsWith(github.ref, 'refs/tags/')
run: aws s3 cp ${{env.TARGET_ARTIFACT}}.7z s3://${{env.RELEASE_BUCKET}} --acl public-read
env:
TARGET_ARTIFACT: ${{ env.PACKAGE_NAME }}-${{ env.OS_TAG }}-${{ env.ReleaseName }}-${{ steps.get_version.outputs.VERSION }}

4 changes: 2 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Clang Format Check
on:
push:
paths-ignore: ['**.md']
branches-ignore: [streamlabs]
branches: [skippy]
pull_request:
paths-ignore: ['**.md']
branches-ignore: [streamlabs]
branches: [skippy]

jobs:
clang-format-check:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-streamlabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
push:
paths-ignore:
- '**.md'
branches: [ "streamlabs" ]
branches: [ "skippy" ]
tags:
- '*'
pull_request:
paths-ignore:
- '**.md'
branches: [ "streamlabs" ]
branches: [ "skippy" ]

env:
InstallPath: "packed_build"
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ on:
push:
paths-ignore: ['**.md']
branches:
- "streamlabs"
- 'release/**'
tags: ['*']
- "skippy"
pull_request:
paths-ignore: ['**.md']
branches: ['streamlabs']
branches: ['skippy']
merge_group:
branches: ['streamlabs']
branches: ['skippy']

env:
InstallPath: "packed_build"
Expand Down Expand Up @@ -243,6 +241,12 @@ jobs:
# name: 'obs-studio-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
# path: ${{env.PACKAGE_NAME}}-macos-release-${{ steps.setup.outputs.commitHash }}-${{ matrix.arch }}.tar.gz

- name: 'Upload debug files to Sentry'
if: startsWith(github.ref, 'refs/tags/')
run: 'python ./slobs_CI/sentry-osx.py'
env:
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
BUILDCONFIG: RelWithDebInfo

linux_build:
name: '02 - Linux'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
paths-ignore:
- '**.md'
branches: [master]
branches: [streamlabs]
types: [ opened, synchronize, reopened ]
permissions:
contents: read
Expand All @@ -28,7 +28,7 @@ jobs:

compatibility-validation:
name: Validate Compatibility 🕵️
if: github.base_ref == 'master'
if: github.base_ref == 'streamlabs'
runs-on: ubuntu-22.04
permissions:
checks: write
Expand All @@ -50,7 +50,7 @@ jobs:

services-validation:
name: Validate Services 🕵️
if: github.base_ref == 'master'
if: github.base_ref == 'streamlabs'
runs-on: ubuntu-22.04
permissions:
checks: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- '**.md'
branches:
- master
- streamlabs
- 'release/**'
tags:
- '*'
Expand Down
Loading
Loading