|
@@ -0,0 +1,166 @@
|
|
|
+variables:
|
|
|
+ macosSignAndNotarize: false
|
|
|
+ isReleaseMode: ${{ and(eq(variables['isReleaseMode'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) }}
|
|
|
+
|
|
|
+trigger:
|
|
|
+ branches:
|
|
|
+ include:
|
|
|
+ - master
|
|
|
+ tags:
|
|
|
+ include:
|
|
|
+ - '*'
|
|
|
+
|
|
|
+jobs:
|
|
|
+- job: 'Build_Windows'
|
|
|
+ pool:
|
|
|
+ vmImage: 'windows-2019'
|
|
|
+ variables:
|
|
|
+ build_config: RelWithDebInfo
|
|
|
+ DepsBasePath: 'D:\obsdependencies'
|
|
|
+ DepsPath32: '$(DepsBasePath)\win32'
|
|
|
+ DepsPath64: '$(DepsBasePath)\win64'
|
|
|
+ QtBaseDir: 'D:\QtDep'
|
|
|
+ QTDIR32: '$(QtBaseDir)\5.10.1\msvc2017'
|
|
|
+ QTDIR64: '$(QtBaseDir)\5.10.1\msvc2017_64'
|
|
|
+ OBSPath: 'D:\obs-studio'
|
|
|
+ steps:
|
|
|
+ - checkout: self
|
|
|
+ submodules: true
|
|
|
+
|
|
|
+ - script: ./ci/windows/install-qt-win.cmd
|
|
|
+ displayName: 'Install Qt'
|
|
|
+ env:
|
|
|
+ QtBaseDir: $(QtBaseDir)
|
|
|
+
|
|
|
+ - task: Cache@2
|
|
|
+ displayName: Restore cached OBS Studio dependencies
|
|
|
+ inputs:
|
|
|
+ key: 'obsdeps | "$(Agent.OS)"'
|
|
|
+ restoreKeys: |
|
|
|
+ obsdeps | "$(Agent.OS)"
|
|
|
+ path: $(DepsBasePath)
|
|
|
+
|
|
|
+ - script: ./ci/windows/download-obs-deps.cmd
|
|
|
+ displayName: 'Download OBS Studio dependencies'
|
|
|
+
|
|
|
+ - task: Cache@2
|
|
|
+ displayName: Restore cached OBS Studio builds
|
|
|
+ inputs:
|
|
|
+ key: 'obs | "$(Agent.OS)"'
|
|
|
+ restoreKeys: |
|
|
|
+ obs | "$(Agent.OS)"
|
|
|
+ path: $(OBSPath)
|
|
|
+
|
|
|
+ - script: ./ci/windows/prepare-obs-windows.cmd
|
|
|
+ displayName: 'Checkout & CMake OBS Studio'
|
|
|
+ env:
|
|
|
+ build_config: $(build_config)
|
|
|
+ DepsPath32: $(DepsPath32)
|
|
|
+ DepsPath64: $(DepsPath64)
|
|
|
+ QTDIR32: $(QTDIR32)
|
|
|
+ QTDIR64: $(QTDIR64)
|
|
|
+ OBSPath: $(OBSPath)
|
|
|
+
|
|
|
+ - task: MSBuild@1
|
|
|
+ displayName: 'Build OBS Studio 32-bit'
|
|
|
+ inputs:
|
|
|
+ msbuildArguments: '/m /p:Configuration=$(build_config)'
|
|
|
+ solution: '$(OBSPath)\build32\obs-studio.sln'
|
|
|
+
|
|
|
+ - task: MSBuild@1
|
|
|
+ displayName: 'Build OBS Studio 64-bit'
|
|
|
+ inputs:
|
|
|
+ msbuildArguments: '/m /p:Configuration=$(build_config)'
|
|
|
+ solution: '$(OBSPath)\build64\obs-studio.sln'
|
|
|
+
|
|
|
+ - script: ./ci/windows/prepare-windows.cmd
|
|
|
+ displayName: 'CMake Plugin'
|
|
|
+ env:
|
|
|
+ build_config: $(build_config)
|
|
|
+ QTDIR32: $(QTDIR32)
|
|
|
+ QTDIR64: $(QTDIR64)
|
|
|
+ OBSPath: $(OBSPath)
|
|
|
+
|
|
|
+ - task: MSBuild@1
|
|
|
+ displayName: 'Build Plugin 32-bit'
|
|
|
+ inputs:
|
|
|
+ msbuildArguments: '/m /p:Configuration=$(build_config)'
|
|
|
+ solution: '.\build32\main.sln'
|
|
|
+
|
|
|
+ - task: MSBuild@1
|
|
|
+ displayName: 'Build Plugin 64-bit'
|
|
|
+ inputs:
|
|
|
+ msbuildArguments: '/m /p:Configuration=$(build_config)'
|
|
|
+ solution: '.\build64\main.sln'
|
|
|
+
|
|
|
+ - script: ./ci/windows/package-windows.cmd
|
|
|
+ displayName: 'Package Plugin'
|
|
|
+
|
|
|
+ - task: PublishBuildArtifacts@1
|
|
|
+ displayName: 'Upload package artifacts'
|
|
|
+ inputs:
|
|
|
+ pathtoPublish: './package'
|
|
|
+ artifactName: 'windows_build'
|
|
|
+
|
|
|
+- job: 'Build_Linux'
|
|
|
+ pool:
|
|
|
+ vmImage: 'ubuntu-18.04'
|
|
|
+ variables:
|
|
|
+ BUILD_REASON: $(Build.Reason)
|
|
|
+ BRANCH_SHORT_NAME: $(Build.SourceBranchName)
|
|
|
+ BRANCH_FULL_NAME: $(Build.SourceBranch)
|
|
|
+ steps:
|
|
|
+ - checkout: self
|
|
|
+ submodules: true
|
|
|
+
|
|
|
+ - script: ./ci/linux/install-dependencies-ubuntu.sh
|
|
|
+ displayName: 'Install dependencies'
|
|
|
+
|
|
|
+ - script: ./ci/linux/build-ubuntu.sh
|
|
|
+ displayName: 'Build Plugin'
|
|
|
+
|
|
|
+ - script: ./ci/linux/package-ubuntu.sh
|
|
|
+ displayName: 'Package Plugin'
|
|
|
+
|
|
|
+ - task: PublishBuildArtifacts@1
|
|
|
+ inputs:
|
|
|
+ pathtoPublish: './package'
|
|
|
+ artifactName: 'deb_build'
|
|
|
+
|
|
|
+- job: 'Build_macOS'
|
|
|
+ pool:
|
|
|
+ vmImage: 'macos-10.14'
|
|
|
+ steps:
|
|
|
+ - checkout: self
|
|
|
+ submodules: true
|
|
|
+
|
|
|
+ - script: ./ci/macos/install-dependencies-macos.sh
|
|
|
+ displayName: 'Install dependencies'
|
|
|
+
|
|
|
+ - script: ./ci/macos/install-build-obs-macos.sh
|
|
|
+ displayName: 'Build OBS'
|
|
|
+
|
|
|
+ - script: ./ci/macos/build-macos.sh
|
|
|
+ displayName: 'Build Plugin'
|
|
|
+
|
|
|
+ - task: InstallAppleCertificate@1
|
|
|
+ displayName: 'Install release signing certificates'
|
|
|
+ condition: eq(variables['isReleaseMode'], true)
|
|
|
+ inputs:
|
|
|
+ certSecureFile: 'Certificates.p12'
|
|
|
+ certPwd: $(secrets.macOS.certificatesImportPassword)
|
|
|
+
|
|
|
+ - script: ./ci/macos/package-macos.sh
|
|
|
+ displayName: 'Package Plugin'
|
|
|
+ env:
|
|
|
+ RELEASE_MODE: $(isReleaseMode)
|
|
|
+ CODE_SIGNING_IDENTITY: $(secrets.macOS.codeSigningIdentity)
|
|
|
+ INSTALLER_SIGNING_IDENTITY: $(secrets.macOS.installerSigningIdentity)
|
|
|
+ AC_USERNAME: $(secrets.macOS.notarization.username)
|
|
|
+ AC_PASSWORD: $(secrets.macOS.notarization.password)
|
|
|
+ AC_PROVIDER_SHORTNAME: $(secrets.macOS.notarization.providerShortName)
|
|
|
+
|
|
|
+ - task: PublishBuildArtifacts@1
|
|
|
+ inputs:
|
|
|
+ pathtoPublish: './release'
|
|
|
+ artifactName: 'macos_build'
|