diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-07-14 03:34:40 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-07-14 03:34:40 +0200 |
commit | bbc5b5d62dfd66e623494bfc67fc469eae6551c6 (patch) | |
tree | c0d52e7abea8f65b33e1016a31495205eb8b8c1c /.ci/templates | |
parent | Merge pull request #2609 from FernandoS27/new-scan (diff) | |
download | yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar.gz yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar.bz2 yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar.lz yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar.xz yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.tar.zst yuzu-bbc5b5d62dfd66e623494bfc67fc469eae6551c6.zip |
Diffstat (limited to '.ci/templates')
-rw-r--r-- | .ci/templates/build-single.yml | 21 | ||||
-rw-r--r-- | .ci/templates/build-standard.yml | 22 | ||||
-rw-r--r-- | .ci/templates/build-testing.yml | 30 | ||||
-rw-r--r-- | .ci/templates/format-check.yml | 14 | ||||
-rw-r--r-- | .ci/templates/merge.yml | 46 | ||||
-rw-r--r-- | .ci/templates/mergebot.yml | 15 | ||||
-rw-r--r-- | .ci/templates/release.yml | 29 | ||||
-rw-r--r-- | .ci/templates/retrieve-artifact-source.yml | 16 | ||||
-rw-r--r-- | .ci/templates/retrieve-master-source.yml | 11 | ||||
-rw-r--r-- | .ci/templates/sync-source.yml | 7 |
10 files changed, 211 insertions, 0 deletions
diff --git a/.ci/templates/build-single.yml b/.ci/templates/build-single.yml new file mode 100644 index 000000000..77eeb96b5 --- /dev/null +++ b/.ci/templates/build-single.yml @@ -0,0 +1,21 @@ +parameters: + artifactSource: 'true' + +steps: +- task: DockerInstaller@0 + displayName: 'Prepare Environment' + inputs: + dockerVersion: '17.09.0-ce' +- task: CacheBeta@0 + displayName: 'Cache Build System' + inputs: + key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix) + path: $(System.DefaultWorkingDirectory)/ccache + cacheHitVar: CACHE_RESTORED +- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/exec.sh && ./.ci/scripts/$(ScriptFolder)/exec.sh + displayName: 'Build' +- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/upload.sh && ./.ci/scripts/$(ScriptFolder)/upload.sh + displayName: 'Package Artifacts' +- publish: artifacts + artifact: 'yuzu-$(BuildName)-$(BuildSuffix)' + displayName: 'Upload Artifacts' diff --git a/.ci/templates/build-standard.yml b/.ci/templates/build-standard.yml new file mode 100644 index 000000000..9975f5c49 --- /dev/null +++ b/.ci/templates/build-standard.yml @@ -0,0 +1,22 @@ +jobs: +- job: build + displayName: 'standard' + pool: + vmImage: ubuntu-latest + strategy: + maxParallel: 10 + matrix: + windows: + BuildSuffix: 'windows-mingw' + ScriptFolder: 'windows' + linux: + BuildSuffix: 'linux' + ScriptFolder: 'linux' + steps: + - template: ./sync-source.yml + parameters: + artifactSource: $(parameters.artifactSource) + needSubmodules: 'true' + - template: ./build-single.yml + parameters: + artifactSource: 'false'
\ No newline at end of file diff --git a/.ci/templates/build-testing.yml b/.ci/templates/build-testing.yml new file mode 100644 index 000000000..101e52996 --- /dev/null +++ b/.ci/templates/build-testing.yml @@ -0,0 +1,30 @@ +jobs: +- job: build_test + displayName: 'testing' + pool: + vmImage: ubuntu-latest + strategy: + maxParallel: 10 + matrix: + windows: + BuildSuffix: 'windows-testing' + ScriptFolder: 'windows' + steps: + - task: PythonScript@0 + condition: eq(variables['Build.Reason'], 'PullRequest') + displayName: 'Determine Testing Status' + inputs: + scriptSource: 'filePath' + scriptPath: '../scripts/merge/check-label-presence.py' + arguments: '$(System.PullRequest.PullRequestNumber) create-testing-build' + - ${{ if eq(variables.enabletesting, 'true') }}: + - template: ./sync-source.yml + parameters: + artifactSource: $(parameters.artifactSource) + needSubmodules: 'true' + - template: ./mergebot.yml + parameters: + matchLabel: 'testing-merge' + - template: ./build-single.yml + parameters: + artifactSource: 'false'
\ No newline at end of file diff --git a/.ci/templates/format-check.yml b/.ci/templates/format-check.yml new file mode 100644 index 000000000..5061f1cb8 --- /dev/null +++ b/.ci/templates/format-check.yml @@ -0,0 +1,14 @@ +parameters: + artifactSource: 'true' + +steps: +- template: ./sync-source.yml + parameters: + artifactSource: $(parameters.artifactSource) + needSubmodules: 'false' +- task: DockerInstaller@0 + displayName: 'Prepare Environment' + inputs: + dockerVersion: '17.09.0-ce' +- script: chmod a+x ./.ci/scripts/format/exec.sh && ./.ci/scripts/format/exec.sh + displayName: 'Verify Formatting' diff --git a/.ci/templates/merge.yml b/.ci/templates/merge.yml new file mode 100644 index 000000000..efc82778a --- /dev/null +++ b/.ci/templates/merge.yml @@ -0,0 +1,46 @@ +jobs: +- job: merge + displayName: 'pull requests' + steps: + - checkout: self + submodules: recursive + - template: ./mergebot.yml + parameters: + matchLabel: '$(BuildName)-merge' + - task: ArchiveFiles@2 + displayName: 'Package Source' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + archiveType: '7z' + archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z' + - task: PublishPipelineArtifact@1 + displayName: 'Upload Artifacts' + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z' + artifact: 'yuzu-$(BuildName)-source' + replaceExistingArchive: true +- job: upload_source + displayName: 'upload' + dependsOn: merge + steps: + - template: ./sync-source.yml + parameters: + artifactSource: 'true' + needSubmodules: 'true' + - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh + displayName: 'Apply Git Configuration' + - script: git tag -a $(BuildName)-$(Build.BuildId) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName)" + displayName: 'Tag Source' + - script: git remote add other $(GitRepoPushChangesURL) + displayName: 'Register Repository' + - script: git push --follow-tags --force other HEAD:$(GitPushBranch) + displayName: 'Update Code' + - script: git rev-list -n 1 $(BuildName)-$(Build.BuildId) > $(Build.ArtifactStagingDirectory)/tag-commit.sha + displayName: 'Calculate Release Point' + - task: PublishPipelineArtifact@1 + displayName: 'Upload Release Point' + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)/tag-commit.sha' + artifact: 'yuzu-$(BuildName)-release-point' + replaceExistingArchive: true
\ No newline at end of file diff --git a/.ci/templates/mergebot.yml b/.ci/templates/mergebot.yml new file mode 100644 index 000000000..5211efcc6 --- /dev/null +++ b/.ci/templates/mergebot.yml @@ -0,0 +1,15 @@ +parameters: + matchLabel: 'dummy-merge' + +steps: + - script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3 + displayName: 'Prepare Environment' + - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh + displayName: 'Apply Git Configuration' + - task: PythonScript@0 + displayName: 'Discover, Download, and Apply Patches' + inputs: + scriptSource: 'filePath' + scriptPath: '.ci/scripts/merge/apply-patches-by-label.py' + arguments: '${{ parameters.matchLabel }} patches' + workingDirectory: '$(System.DefaultWorkingDirectory)' diff --git a/.ci/templates/release.yml b/.ci/templates/release.yml new file mode 100644 index 000000000..60bebd2aa --- /dev/null +++ b/.ci/templates/release.yml @@ -0,0 +1,29 @@ +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)' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Release Point' + inputs: + artifactName: 'yuzu-$(BuildName)-release-point' + buildType: 'current' + targetPath: '$(Build.ArtifactStagingDirectory)' + - script: echo '##vso[task.setvariable variable=tagcommit]' && cat $(Build.ArtifactStagingDirectory)/tag-commit.sha + displayName: 'Calculate Release Point' + - task: GitHubRelease@0 + inputs: + gitHubConnection: $(GitHubReleaseConnectionName) + repositoryName: '$(GitHubReleaseRepoName)' + action: 'create' + target: $(variables.tagcommit) + title: 'yuzu $(BuildName) #$(Build.BuildId)' + assets: '$(Build.ArtifactStagingDirectory)/*' diff --git a/.ci/templates/retrieve-artifact-source.yml b/.ci/templates/retrieve-artifact-source.yml new file mode 100644 index 000000000..47d217e7b --- /dev/null +++ b/.ci/templates/retrieve-artifact-source.yml @@ -0,0 +1,16 @@ +steps: +- checkout: none +- task: DownloadPipelineArtifact@2 + displayName: 'Download Source' + inputs: + artifactName: 'yuzu-$(BuildName)-source' + buildType: 'current' + targetPath: '$(Build.ArtifactStagingDirectory)' +- script: rm -rf $(System.DefaultWorkingDirectory) && mkdir $(System.DefaultWorkingDirectory) + displayName: 'Clean Working Directory' +- task: ExtractFiles@1 + displayName: 'Prepare Source' + inputs: + archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/*.7z' + destinationFolder: '$(System.DefaultWorkingDirectory)' + cleanDestinationFolder: false
\ No newline at end of file diff --git a/.ci/templates/retrieve-master-source.yml b/.ci/templates/retrieve-master-source.yml new file mode 100644 index 000000000..a08a3f926 --- /dev/null +++ b/.ci/templates/retrieve-master-source.yml @@ -0,0 +1,11 @@ +parameters: + needSubmodules: 'true' + +steps: +- checkout: self + displayName: 'Checkout Recursive' + submodules: recursive +# condition: eq(parameters.needSubmodules, 'true') +#- checkout: self +# displayName: 'Checkout Fast' +# condition: ne(parameters.needSubmodules, 'true') diff --git a/.ci/templates/sync-source.yml b/.ci/templates/sync-source.yml new file mode 100644 index 000000000..409e1cd83 --- /dev/null +++ b/.ci/templates/sync-source.yml @@ -0,0 +1,7 @@ +steps: +- ${{ if eq(parameters.artifactSource, 'true') }}: + - template: ./retrieve-artifact-source.yml +- ${{ if ne(parameters.artifactSource, 'true') }}: + - template: ./retrieve-master-source.yml + parameters: + needSubmodules: $(parameters.needSubmodules)
\ No newline at end of file |