summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-09-22 16:01:29 -0400
committerGravatar Flame Sage2019-09-22 20:01:29 +0000
commitcc3db2aa43ee617ed5086976e0354c72feba713c (patch)
tree4e61181ceb6784282cb034cf5231d9b259ce6e1d
parentMerge pull request #2683 from DarkLordZach/lock-exit (diff)
downloadyuzu-cc3db2aa43ee617ed5086976e0354c72feba713c.tar.gz
yuzu-cc3db2aa43ee617ed5086976e0354c72feba713c.tar.xz
yuzu-cc3db2aa43ee617ed5086976e0354c72feba713c.zip
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
-rw-r--r--.ci/templates/build-mock.yml5
-rw-r--r--.ci/templates/build-single.yml13
-rw-r--r--.ci/templates/release-download.yml13
-rw-r--r--.ci/templates/release-github.yml11
-rw-r--r--.ci/templates/release-universal.yml10
-rw-r--r--.ci/yuzu-mainline-step1.yml8
-rw-r--r--.ci/yuzu-mainline-step2.yml (renamed from .ci/yuzu-mainline.yml)15
7 files changed, 62 insertions, 13 deletions
diff --git a/.ci/templates/build-mock.yml b/.ci/templates/build-mock.yml
new file mode 100644
index 000000000..e7aba93de
--- /dev/null
+++ b/.ci/templates/build-mock.yml
@@ -0,0 +1,5 @@
1steps:
2 - script: mkdir artifacts || echo 'X' > artifacts/T1.txt
3 - publish: artifacts
4 artifact: 'yuzu-$(BuildName)-$(BuildSuffix)'
5 displayName: 'Upload Artifacts' \ No newline at end of file
diff --git a/.ci/templates/build-single.yml b/.ci/templates/build-single.yml
index 357731eb9..cd9d1df88 100644
--- a/.ci/templates/build-single.yml
+++ b/.ci/templates/build-single.yml
@@ -7,13 +7,12 @@ steps:
7 displayName: 'Prepare Environment' 7 displayName: 'Prepare Environment'
8 inputs: 8 inputs:
9 dockerVersion: '17.09.0-ce' 9 dockerVersion: '17.09.0-ce'
10- ${{ if eq(parameters.cache, 'true') }}: 10- task: CacheBeta@0
11 - task: CacheBeta@0 11 displayName: 'Cache Build System'
12 displayName: 'Cache Build System' 12 inputs:
13 inputs: 13 key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix)
14 key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix) 14 path: $(System.DefaultWorkingDirectory)/ccache
15 path: $(System.DefaultWorkingDirectory)/ccache 15 cacheHitVar: CACHE_RESTORED
16 cacheHitVar: CACHE_RESTORED
17- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/exec.sh && ./.ci/scripts/$(ScriptFolder)/exec.sh 16- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/exec.sh && ./.ci/scripts/$(ScriptFolder)/exec.sh
18 displayName: 'Build' 17 displayName: 'Build'
19- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/upload.sh && RELEASE_NAME=$(BuildName) ./.ci/scripts/$(ScriptFolder)/upload.sh 18- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/upload.sh && RELEASE_NAME=$(BuildName) ./.ci/scripts/$(ScriptFolder)/upload.sh
diff --git a/.ci/templates/release-download.yml b/.ci/templates/release-download.yml
new file mode 100644
index 000000000..50ca06bb2
--- /dev/null
+++ b/.ci/templates/release-download.yml
@@ -0,0 +1,13 @@
1steps:
2 - task: DownloadPipelineArtifact@2
3 displayName: 'Download Windows Release'
4 inputs:
5 artifactName: 'yuzu-$(BuildName)-windows-mingw'
6 buildType: 'current'
7 targetPath: '$(Build.ArtifactStagingDirectory)'
8 - task: DownloadPipelineArtifact@2
9 displayName: 'Download Linux Release'
10 inputs:
11 artifactName: 'yuzu-$(BuildName)-linux'
12 buildType: 'current'
13 targetPath: '$(Build.ArtifactStagingDirectory)' \ No newline at end of file
diff --git a/.ci/templates/release-github.yml b/.ci/templates/release-github.yml
new file mode 100644
index 000000000..39fd47f1c
--- /dev/null
+++ b/.ci/templates/release-github.yml
@@ -0,0 +1,11 @@
1steps:
2 - template: ./release-download.yml
3 - task: GitHubRelease@0
4 inputs:
5 action: 'create'
6 title: 'yuzu $(BuildName) #$(Build.BuildId)'
7 assets: '$(Build.ArtifactStagingDirectory)/*'
8 gitHubConnection: $(GitHubReleaseConnectionName)
9 repositoryName: '$(Build.Repository.Name)'
10 target: '$(Build.SourceVersion)'
11 tagSource: 'auto' \ No newline at end of file
diff --git a/.ci/templates/release-universal.yml b/.ci/templates/release-universal.yml
new file mode 100644
index 000000000..707697007
--- /dev/null
+++ b/.ci/templates/release-universal.yml
@@ -0,0 +1,10 @@
1steps:
2 - template: ./release-download.yml
3 - task: UniversalPackages@0
4 displayName: Publish Artifacts
5 inputs:
6 command: publish
7 publishDirectory: '$(Build.ArtifactStagingDirectory)'
8 vstsFeedPublish: 'yuzu-$(BuildName)'
9 vstsFeedPackagePublish: 'main'
10 packagePublishDescription: 'Yuzu Windows and Linux Executable Packages' \ No newline at end of file
diff --git a/.ci/yuzu-mainline-step1.yml b/.ci/yuzu-mainline-step1.yml
new file mode 100644
index 000000000..3fd33d75a
--- /dev/null
+++ b/.ci/yuzu-mainline-step1.yml
@@ -0,0 +1,8 @@
1trigger:
2- master
3
4stages:
5- stage: merge
6 displayName: 'merge'
7 jobs:
8 - template: ./templates/merge.yml
diff --git a/.ci/yuzu-mainline.yml b/.ci/yuzu-mainline-step2.yml
index 2930a8564..fec724d11 100644
--- a/.ci/yuzu-mainline.yml
+++ b/.ci/yuzu-mainline-step2.yml
@@ -2,12 +2,7 @@ trigger:
2- master 2- master
3 3
4stages: 4stages:
5- stage: merge
6 displayName: 'merge'
7 jobs:
8 - template: ./templates/merge.yml
9- stage: format 5- stage: format
10 dependsOn: merge
11 displayName: 'format' 6 displayName: 'format'
12 jobs: 7 jobs:
13 - job: format 8 - job: format
@@ -17,9 +12,17 @@ stages:
17 steps: 12 steps:
18 - template: ./templates/format-check.yml 13 - template: ./templates/format-check.yml
19- stage: build 14- stage: build
20 displayName: 'build'
21 dependsOn: format 15 dependsOn: format
16 displayName: 'build'
22 jobs: 17 jobs:
23 - template: ./templates/build-standard.yml 18 - template: ./templates/build-standard.yml
24 parameters: 19 parameters:
25 cache: 'true' 20 cache: 'true'
21- stage: release
22 displayName: 'Release'
23 dependsOn: build
24 jobs:
25 - job: github
26 displayName: 'GitHub Release'
27 steps:
28 - template: ./templates/release-github.yml \ No newline at end of file