mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
201 lines
5.9 KiB
YAML
201 lines
5.9 KiB
YAML
variables:
|
||
isReleaseMode: ${{ startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}
|
||
|
||
trigger:
|
||
branches:
|
||
include:
|
||
- '4.x-current'
|
||
- '4.x-compat'
|
||
tags:
|
||
include:
|
||
- '*'
|
||
|
||
jobs:
|
||
- job: 'GenerateDocs'
|
||
condition: |
|
||
or(
|
||
eq(variables['Build.SourceBranch'], 'refs/heads/4.x-current'),
|
||
eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
||
)
|
||
pool:
|
||
vmImage: 'ubuntu-18.04'
|
||
steps:
|
||
- checkout: self
|
||
submodules: false
|
||
|
||
- script: ./CI/generate-docs.sh
|
||
displayName: 'Generate docs'
|
||
env:
|
||
CHECKOUT_REF: $(Build.SourceBranch)
|
||
GH_TOKEN: $(GithubToken)
|
||
|
||
- job: 'Build_Windows'
|
||
pool:
|
||
vmImage: 'windows-2019'
|
||
variables:
|
||
build_config: RelWithDebInfo
|
||
DEPS_CACHE_VERSION: '1' # Change whenever updating OBS dependencies URL, in order to force a cache reset
|
||
DEPS_BASE_PATH: 'D:\obsdependencies'
|
||
DEPS_PATH_32: '$(DEPS_BASE_PATH)\win32'
|
||
DEPS_PATH_64: '$(DEPS_BASE_PATH)\win64'
|
||
QT_CACHE_VERSION: '1' # Change whenever updating Qt dependency URL, in order to force a cache reset
|
||
QT_BASE_DIR: 'D:\QtDep'
|
||
QTDIR32: '$(QT_BASE_DIR)\5.15.2\msvc2019'
|
||
QTDIR64: '$(QT_BASE_DIR)\5.15.2\msvc2019_64'
|
||
OBS_CACHE_VERSION: '1'
|
||
OBS_PATH: 'D:\obs-studio'
|
||
steps:
|
||
- checkout: self
|
||
submodules: true
|
||
|
||
- task: Cache@2
|
||
displayName: Restore cached Qt archive file
|
||
inputs:
|
||
key: 'qtdep-"$(QT_CACHE_VERSION)" | "$(Agent.OS)"'
|
||
restoreKeys: |
|
||
qtdep-"$(QT_CACHE_VERSION)" | "$(Agent.OS)"
|
||
path: $(QT_BASE_DIR)
|
||
|
||
- script: ./CI/windows/install-qt-win.cmd
|
||
displayName: 'Install Qt'
|
||
env:
|
||
QT_BASE_DIR: $(QT_BASE_DIR)
|
||
|
||
- task: Cache@2
|
||
displayName: Restore cached OBS Studio dependencies
|
||
inputs:
|
||
key: 'obsdeps-"$(DEPS_CACHE_VERSION)" | "$(Agent.OS)"'
|
||
restoreKeys: |
|
||
obsdeps-"$(DEPS_CACHE_VERSION)" | "$(Agent.OS)"
|
||
path: $(DEPS_BASE_PATH)
|
||
|
||
- script: ./CI/windows/download-obs-deps.cmd
|
||
displayName: 'Download OBS Studio dependencies'
|
||
|
||
- task: Cache@2
|
||
displayName: Restore cached OBS Studio builds
|
||
inputs:
|
||
key: 'obs-"$(OBS_CACHE_VERSION)" | "$(Agent.OS)"'
|
||
restoreKeys: |
|
||
obs-"$(OBS_CACHE_VERSION)" | "$(Agent.OS)"
|
||
path: $(OBS_PATH)
|
||
|
||
- script: ./CI/windows/prepare-obs-windows.cmd
|
||
displayName: 'Checkout & CMake OBS Studio'
|
||
env:
|
||
build_config: $(build_config)
|
||
DEPS_PATH_32: $(DEPS_PATH_32)
|
||
DEPS_PATH_64: $(DEPS_PATH_64)
|
||
QTDIR32: $(QTDIR32)
|
||
QTDIR64: $(QTDIR64)
|
||
OBS_PATH: $(OBS_PATH)
|
||
|
||
- task: MSBuild@1
|
||
displayName: 'Build OBS Studio 32-bit'
|
||
inputs:
|
||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||
solution: '$(OBS_PATH)\build32\obs-studio.sln'
|
||
|
||
- task: MSBuild@1
|
||
displayName: 'Build OBS Studio 64-bit'
|
||
inputs:
|
||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||
solution: '$(OBS_PATH)\build64\obs-studio.sln'
|
||
|
||
- script: ./CI/windows/prepare-plugin-windows.cmd
|
||
displayName: 'CMake obs-websocket'
|
||
env:
|
||
build_config: $(build_config)
|
||
QTDIR32: $(QTDIR32)
|
||
QTDIR64: $(QTDIR64)
|
||
OBS_PATH: $(OBS_PATH)
|
||
|
||
- task: MSBuild@1
|
||
displayName: 'Build obs-websocket 32-bit'
|
||
inputs:
|
||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||
solution: '.\build32\obs-websocket-compat.sln'
|
||
|
||
- task: MSBuild@1
|
||
displayName: 'Build obs-websocket 64-bit'
|
||
inputs:
|
||
msbuildArguments: '/m /p:Configuration=$(build_config)'
|
||
solution: '.\build64\obs-websocket-compat.sln'
|
||
|
||
- script: ./CI/windows/package-plugin-windows.cmd
|
||
displayName: 'Package obs-websocket'
|
||
|
||
- task: PublishBuildArtifacts@1
|
||
displayName: 'Upload package artifacts'
|
||
inputs:
|
||
pathtoPublish: './package'
|
||
artifactName: 'windows_build'
|
||
|
||
- job: 'Build_Linux'
|
||
pool:
|
||
vmImage: 'ubuntu-20.04'
|
||
variables:
|
||
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-plugin-ubuntu.sh
|
||
displayName: 'Build obs-websocket'
|
||
|
||
- script: ./CI/linux/package-plugin-ubuntu.sh
|
||
displayName: 'Package obs-websocket'
|
||
|
||
- task: PublishBuildArtifacts@1
|
||
inputs:
|
||
pathtoPublish: './package'
|
||
artifactName: 'deb_build'
|
||
|
||
- job: 'Build_macOS'
|
||
pool:
|
||
vmImage: 'macOS-10.15'
|
||
variables:
|
||
OBS_DEPS_VERSION: '2020-12-22'
|
||
QT_VERSION: '5.15.2'
|
||
steps:
|
||
- checkout: self
|
||
submodules: true
|
||
|
||
- script: ./CI/macos/install-dependencies-macos.sh
|
||
displayName: 'Install dependencies'
|
||
env:
|
||
OBS_DEPS_VERSION: $(OBS_DEPS_VERSION)
|
||
QT_VERSION: $(QT_VERSION)
|
||
|
||
- script: ./CI/macos/install-build-obs-macos.sh
|
||
displayName: 'Build OBS'
|
||
|
||
- script: ./CI/macos/build-plugin-macos.sh
|
||
displayName: 'Build obs-websocket'
|
||
|
||
- task: InstallAppleCertificate@2
|
||
displayName: 'Install release signing certificates'
|
||
condition: eq(variables['isReleaseMode'], true)
|
||
inputs:
|
||
certSecureFile: 'Certificates.p12'
|
||
certPwd: $(secrets.macOS.certificatesImportPassword)
|
||
|
||
- script: ./CI/macos/package-plugin-macos.sh
|
||
displayName: 'Package obs-websocket'
|
||
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'
|