mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
CI: Keep artifacts for PRs labelled "Seeking Testers"
This commit is contained in:
parent
f00763d641
commit
4d94c4763e
|
@ -12,7 +12,23 @@ variables:
|
|||
RESTREAM-HASH: $(restream_hash)
|
||||
|
||||
jobs:
|
||||
- job: Prebuild
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- bash: |
|
||||
if curl -s "https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels" | grep '"name": "Seeking Testers"'
|
||||
then
|
||||
echo "##vso[task.setvariable variable=prHasCILabel;isOutput=true]true"
|
||||
fi
|
||||
displayName: 'Check if PR should keep artifacts'
|
||||
condition: eq(variables['Build.Reason'], 'PullRequest')
|
||||
name: checkPrLabel
|
||||
|
||||
- job: 'Build_macOS'
|
||||
dependsOn: Prebuild
|
||||
variables:
|
||||
prHasCILabel: $[ dependencies.Prebuild.outputs['checkPrLabel.prHasCILabel'] ]
|
||||
pool:
|
||||
vmImage: 'macos-10.13'
|
||||
steps:
|
||||
|
@ -31,16 +47,19 @@ jobs:
|
|||
displayName: 'Build'
|
||||
|
||||
- script: ./CI/before-deploy-osx.sh
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
displayName: 'Before Deploy'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
inputs:
|
||||
pathtoPublish: './nightly'
|
||||
artifactName: build
|
||||
|
||||
- job: 'Build_Windows32'
|
||||
dependsOn: Prebuild
|
||||
variables:
|
||||
prHasCILabel: $[ dependencies.Prebuild.outputs['checkPrLabel.prHasCILabel'] ]
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
|
@ -56,15 +75,18 @@ jobs:
|
|||
msbuildArguments: '/m /p:Configuration=RelWithDebInfo'
|
||||
solution: .\build32\obs-studio.sln
|
||||
- script: ./CI/before-deploy-win.cmd
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
displayName: 'Before deploy'
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
inputs:
|
||||
pathtoPublish: './build'
|
||||
artifactName: winbuild
|
||||
|
||||
- job: 'Build_Windows64'
|
||||
dependsOn: Prebuild
|
||||
variables:
|
||||
prHasCILabel: $[ dependencies.Prebuild.outputs['checkPrLabel.prHasCILabel'] ]
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
|
@ -80,15 +102,18 @@ jobs:
|
|||
msbuildArguments: '/m /p:Configuration=RelWithDebInfo'
|
||||
solution: .\build64\obs-studio.sln
|
||||
- script: ./CI/before-deploy-win.cmd
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
displayName: 'Before deploy'
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['prHasCILabel'], true))
|
||||
inputs:
|
||||
pathtoPublish: './build'
|
||||
artifactName: winbuild
|
||||
|
||||
- job: 'Build_Linux'
|
||||
dependsOn: Prebuild
|
||||
variables:
|
||||
prHasCILabel: $[ dependencies.Prebuild.outputs['checkPrLabel.prHasCILabel'] ]
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
|
|
Loading…
Reference in a new issue