ci: Split mainline pipeline and add support for GitHub releases (#2900)
* ci: Add mock build alternative for fast testing * ci: Always cache build * ci: Extract steps to download build stage artifacts * ci: Add template to release to GitHub * ci: Add template to release to Azure Universal Artifacts * ci: Split mainline to two pipelines
This commit is contained in:
parent
aaec1562f8
commit
cc3db2aa43
5
.ci/templates/build-mock.yml
Normal file
5
.ci/templates/build-mock.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
steps:
|
||||||
|
- script: mkdir artifacts || echo 'X' > artifacts/T1.txt
|
||||||
|
- publish: artifacts
|
||||||
|
artifact: 'yuzu-$(BuildName)-$(BuildSuffix)'
|
||||||
|
displayName: 'Upload Artifacts'
|
@ -7,8 +7,7 @@ steps:
|
|||||||
displayName: 'Prepare Environment'
|
displayName: 'Prepare Environment'
|
||||||
inputs:
|
inputs:
|
||||||
dockerVersion: '17.09.0-ce'
|
dockerVersion: '17.09.0-ce'
|
||||||
- ${{ if eq(parameters.cache, 'true') }}:
|
- task: CacheBeta@0
|
||||||
- task: CacheBeta@0
|
|
||||||
displayName: 'Cache Build System'
|
displayName: 'Cache Build System'
|
||||||
inputs:
|
inputs:
|
||||||
key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix)
|
key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix)
|
||||||
|
13
.ci/templates/release-download.yml
Normal file
13
.ci/templates/release-download.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
steps:
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: 'Download Windows Release'
|
||||||
|
inputs:
|
||||||
|
artifactName: 'yuzu-$(BuildName)-windows-mingw'
|
||||||
|
buildType: 'current'
|
||||||
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: 'Download Linux Release'
|
||||||
|
inputs:
|
||||||
|
artifactName: 'yuzu-$(BuildName)-linux'
|
||||||
|
buildType: 'current'
|
||||||
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
11
.ci/templates/release-github.yml
Normal file
11
.ci/templates/release-github.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
steps:
|
||||||
|
- template: ./release-download.yml
|
||||||
|
- task: GitHubRelease@0
|
||||||
|
inputs:
|
||||||
|
action: 'create'
|
||||||
|
title: 'yuzu $(BuildName) #$(Build.BuildId)'
|
||||||
|
assets: '$(Build.ArtifactStagingDirectory)/*'
|
||||||
|
gitHubConnection: $(GitHubReleaseConnectionName)
|
||||||
|
repositoryName: '$(Build.Repository.Name)'
|
||||||
|
target: '$(Build.SourceVersion)'
|
||||||
|
tagSource: 'auto'
|
10
.ci/templates/release-universal.yml
Normal file
10
.ci/templates/release-universal.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
steps:
|
||||||
|
- template: ./release-download.yml
|
||||||
|
- task: UniversalPackages@0
|
||||||
|
displayName: Publish Artifacts
|
||||||
|
inputs:
|
||||||
|
command: publish
|
||||||
|
publishDirectory: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
vstsFeedPublish: 'yuzu-$(BuildName)'
|
||||||
|
vstsFeedPackagePublish: 'main'
|
||||||
|
packagePublishDescription: 'Yuzu Windows and Linux Executable Packages'
|
8
.ci/yuzu-mainline-step1.yml
Normal file
8
.ci/yuzu-mainline-step1.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
trigger:
|
||||||
|
- master
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: merge
|
||||||
|
displayName: 'merge'
|
||||||
|
jobs:
|
||||||
|
- template: ./templates/merge.yml
|
@ -2,12 +2,7 @@ trigger:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: merge
|
|
||||||
displayName: 'merge'
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/merge.yml
|
|
||||||
- stage: format
|
- stage: format
|
||||||
dependsOn: merge
|
|
||||||
displayName: 'format'
|
displayName: 'format'
|
||||||
jobs:
|
jobs:
|
||||||
- job: format
|
- job: format
|
||||||
@ -17,9 +12,17 @@ stages:
|
|||||||
steps:
|
steps:
|
||||||
- template: ./templates/format-check.yml
|
- template: ./templates/format-check.yml
|
||||||
- stage: build
|
- stage: build
|
||||||
displayName: 'build'
|
|
||||||
dependsOn: format
|
dependsOn: format
|
||||||
|
displayName: 'build'
|
||||||
jobs:
|
jobs:
|
||||||
- template: ./templates/build-standard.yml
|
- template: ./templates/build-standard.yml
|
||||||
parameters:
|
parameters:
|
||||||
cache: 'true'
|
cache: 'true'
|
||||||
|
- stage: release
|
||||||
|
displayName: 'Release'
|
||||||
|
dependsOn: build
|
||||||
|
jobs:
|
||||||
|
- job: github
|
||||||
|
displayName: 'GitHub Release'
|
||||||
|
steps:
|
||||||
|
- template: ./templates/release-github.yml
|
Loading…
Reference in New Issue
Block a user