|
| 1 | +parameters: # parameters are shown up in ADO UI in a build queue time |
| 2 | +- name: 'debug' |
| 3 | + displayName: 'Enable debug output' |
| 4 | + type: boolean |
| 5 | + default: false |
| 6 | + |
| 7 | +variables: |
| 8 | +- template: variables/version.yml |
| 9 | +- template: variables/OneBranchVariables.yml |
| 10 | + parameters: |
| 11 | + debug: ${{ parameters.debug }} |
| 12 | + |
| 13 | +name: 2.0.$(date:yyMMdd)$(rev:.r) |
| 14 | + |
| 15 | +trigger: none |
| 16 | + |
| 17 | +resources: |
| 18 | + repositories: |
| 19 | + - repository: templates |
| 20 | + type: git |
| 21 | + name: OneBranch.Pipelines/GovernedTemplates |
| 22 | + ref: refs/heads/main |
| 23 | + |
| 24 | +extends: |
| 25 | + template: v2/Microsoft.Official.yml@templates |
| 26 | + parameters: |
| 27 | + platform: |
| 28 | + name: 'windows_undocked' |
| 29 | + product: 'build_tools' |
| 30 | + |
| 31 | + cloudvault: |
| 32 | + enabled: false |
| 33 | + |
| 34 | + globalSdl: |
| 35 | + tsa: |
| 36 | + enabled: false |
| 37 | + |
| 38 | + nugetPublishing: |
| 39 | + feeds: |
| 40 | + name: CppWinRT |
| 41 | + |
| 42 | + stages: |
| 43 | + - stage: build |
| 44 | + pool: |
| 45 | + type: windows |
| 46 | + |
| 47 | + jobs: |
| 48 | + - template: .pipelines/jobs/OneBranchBuild.yml@self |
| 49 | + parameters: |
| 50 | + BuildConfiguration: $(BuildConfiguration) |
| 51 | + BuildVersion: $(BuildVersion) |
| 52 | + OfficialBuild: true |
| 53 | + |
| 54 | + - stage: vpack |
| 55 | + dependsOn: build |
| 56 | + jobs: |
| 57 | + - job: Compiler_vpack |
| 58 | + pool: |
| 59 | + type: windows |
| 60 | + variables: |
| 61 | + ob_outputDirectory: '$(Build.SourcesDirectory)\out' |
| 62 | + |
| 63 | + ob_createvpack_enabled: true |
| 64 | + ob_createvpack_packagename: CppWinRT.Compiler |
| 65 | + ob_createvpack_owneralias: cpp4uwpt |
| 66 | + ob_createvpack_description: C++/WinRT Compiler |
| 67 | + ob_createvpack_provData: true |
| 68 | + ob_createvpack_versionAs: parts |
| 69 | + ob_createvpack_majorVer: $(MajorVersion) |
| 70 | + ob_createvpack_minorVer: $(MinorVersion) |
| 71 | + ob_createvpack_patchVer: $(PatchVersion) |
| 72 | + ob_createvpack_metadata: $(Build.SourceBranchName).x86.$(Build.BuildNumber).$(Build.SourceVersion) |
| 73 | + ob_createvpack_target: $(OSBuildToolsRoot)\cppwinrt |
| 74 | + |
| 75 | + steps: |
| 76 | + - task: UseDotNet@2 |
| 77 | + continueOnError: true |
| 78 | + inputs: |
| 79 | + packageType: 'runtime' |
| 80 | + version: '6.x' |
| 81 | + performMultiLevelLookup: true |
| 82 | + |
| 83 | + - task: DownloadPipelineArtifact@2 |
| 84 | + displayName: 'Download x86 artifacts' |
| 85 | + inputs: |
| 86 | + artifactName: 'drop_build_x86' |
| 87 | + targetPath: '$(Build.SourcesDirectory)/x86' |
| 88 | + |
| 89 | + - task: CopyFiles@2 |
| 90 | + displayName: 'Stage compiler vpack contents' |
| 91 | + inputs: |
| 92 | + SourceFolder: $(Build.SourcesDirectory)/x86 |
| 93 | + Contents: | |
| 94 | + cppwinrt/cppwinrt.exe |
| 95 | + cppwinrt/cppwinrt.pdb |
| 96 | + TargetFolder: $(ob_outputDirectory) |
| 97 | + |
| 98 | + - job: MSBuild_vpack |
| 99 | + pool: |
| 100 | + type: windows |
| 101 | + variables: |
| 102 | + ob_outputDirectory: '$(Build.SourcesDirectory)\out' |
| 103 | + |
| 104 | + ob_createvpack_enabled: true |
| 105 | + ob_createvpack_packagename: CppWinRT.MSBuild |
| 106 | + ob_createvpack_owneralias: cpp4uwpt |
| 107 | + ob_createvpack_description: C++/WinRT MSBuild |
| 108 | + ob_createvpack_provData: true |
| 109 | + ob_createvpack_versionAs: parts |
| 110 | + ob_createvpack_majorVer: $(MajorVersion) |
| 111 | + ob_createvpack_minorVer: $(MinorVersion) |
| 112 | + ob_createvpack_patchVer: $(PatchVersion) |
| 113 | + ob_createvpack_metadata: $(Build.SourceBranchName).$(Build.BuildNumber).$(Build.SourceVersion) |
| 114 | + ob_createvpack_verbose: true |
| 115 | + ob_createvpack_target: $(OSBuildToolsRoot)\cppwinrt |
| 116 | + |
| 117 | + steps: |
| 118 | + - task: UseDotNet@2 |
| 119 | + continueOnError: true |
| 120 | + inputs: |
| 121 | + packageType: 'runtime' |
| 122 | + version: '6.x' |
| 123 | + performMultiLevelLookup: true |
| 124 | + |
| 125 | + - task: DownloadPipelineArtifact@2 |
| 126 | + displayName: 'Download x86 artifacts' |
| 127 | + inputs: |
| 128 | + artifactName: 'drop_build_x86' |
| 129 | + targetPath: '$(Build.SourcesDirectory)/x86' |
| 130 | + |
| 131 | + - task: DownloadPipelineArtifact@2 |
| 132 | + displayName: 'Download x64 artifacts' |
| 133 | + inputs: |
| 134 | + artifactName: 'drop_build_x64' |
| 135 | + targetPath: '$(Build.SourcesDirectory)/x64' |
| 136 | + |
| 137 | + - task: DownloadPipelineArtifact@2 |
| 138 | + displayName: 'Download arm artifacts' |
| 139 | + inputs: |
| 140 | + artifactName: 'drop_build_arm' |
| 141 | + targetPath: '$(Build.SourcesDirectory)/arm' |
| 142 | + |
| 143 | + - task: DownloadPipelineArtifact@2 |
| 144 | + displayName: 'Download arm64 artifacts' |
| 145 | + inputs: |
| 146 | + artifactName: 'drop_build_arm64' |
| 147 | + targetPath: '$(Build.SourcesDirectory)/arm64' |
| 148 | + |
| 149 | + - task: CmdLine@2 |
| 150 | + displayName: 'Stage MSBuild vpack contents' |
| 151 | + inputs: |
| 152 | + script: | |
| 153 | + set TargetDir=$(ob_outputDirectory) |
| 154 | + rd /s /q %TargetDir% >nul 2>&1 |
| 155 | + md %TargetDir% |
| 156 | + cd %TargetDir% |
| 157 | +
|
| 158 | + copy $(Build.SourcesDirectory)\vsix\Microsoft.Cpp.CppWinRT.props |
| 159 | + copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.props Microsoft.Cpp.CppWinRTEnabled.props |
| 160 | + copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.targets Microsoft.Cpp.CppWinRTEnabled.targets |
| 161 | + copy $(Build.SourcesDirectory)\nuget\CppWinrtRules.Project.xml CppWinrtRules.Project.xml |
| 162 | + echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\i386 |
| 163 | + echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\Win32 |
| 164 | + echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\amd64 |
| 165 | + echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\x64 |
| 166 | + echo d | xcopy $(Build.SourcesDirectory)\arm\cppwinrt_fast_forwarder.lib build\native\lib\arm |
| 167 | + echo d | xcopy $(Build.SourcesDirectory)\arm64\cppwinrt_fast_forwarder.lib build\native\lib\arm64 |
| 168 | +
|
| 169 | + - stage: NuGet |
| 170 | + dependsOn: build |
| 171 | + jobs: |
| 172 | + - template: .pipelines/jobs/OneBranchNuGet.yml@self |
| 173 | + parameters: |
| 174 | + BuildConfiguration: $(BuildConfiguration) |
| 175 | + BuildVersion: $(BuildVersion) |
| 176 | + OfficialBuild: true |
| 177 | + |
| 178 | + - stage: Test |
| 179 | + dependsOn: build |
| 180 | + jobs: |
| 181 | + - template: .pipelines/jobs/OneBranchTest.yml@self |
| 182 | + parameters: |
| 183 | + BuildConfiguration: $(BuildConfiguration) |
| 184 | + BuildVersion: $(BuildVersion) |
| 185 | + |
| 186 | + - stage: Vsix |
| 187 | + dependsOn: NuGet |
| 188 | + jobs: |
| 189 | + - template: .pipelines/jobs/OneBranchVsix.yml@self |
| 190 | + parameters: |
| 191 | + BuildConfiguration: $(BuildConfiguration) |
| 192 | + BuildVersion: $(BuildVersion) |
| 193 | + OfficialBuild: true |
0 commit comments