-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f23fb4b
commit 79a3ad2
Showing
8 changed files
with
409 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
parameters: | ||
- name: OfficialBuild | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
- job: Build_External_Packages | ||
displayName: Build External Packages (NuGet) | ||
cancelTimeoutInMinutes: 1 | ||
dependsOn: Build_ABI_Tool | ||
pool: | ||
type: windows | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)\out' | ||
ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }} | ||
PackageVersion: $(Build.BuildNumber) | ||
|
||
steps: | ||
|
||
- task: NuGetToolInstaller@1 | ||
displayName: Use NuGet 6.7 | ||
continueOnError: True | ||
inputs: | ||
versionSpec: 6.7 | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
displayName: Download x86 Artifacts | ||
inputs: | ||
artifactName: drop_stage_Build_ABI_Toolrelease_x86 | ||
targetPath: $(Build.SourcesDirectory)\x86 | ||
|
||
- task: CmdLine@2 | ||
displayName: Touch Tools | ||
inputs: | ||
script: > | ||
rem Signing service stamps binary with a future (GMT) timestamp, breaking build dependencies | ||
copy /b $(Build.SourcesDirectory)\x86\abi\abi.exe+,, abi.exe | ||
workingDirectory: $(Build.ArtifactStagingDirectory) | ||
failOnStderr: true | ||
|
||
- task: NuGetCommand@2 | ||
displayName: Build NuGet | ||
inputs: | ||
command: pack | ||
searchPatternPack: src/package/abi/Microsoft.Windows.AbiWinRT.nuspec | ||
versioningScheme: byBuildNumber | ||
buildProperties: abiwinrt_exe=$(Build.ArtifactStagingDirectory)\abi.exe | ||
packDestination: $(ob_outputDirectory)\packages | ||
|
||
- task: onebranch.pipeline.signing@1 | ||
displayName: '🔒 Onebranch Signing for AbiWinRT nuget package' | ||
condition: eq(${{ parameters.OfficialBuild }}, 'true') | ||
inputs: | ||
command: sign | ||
signing_profile: external_distribution | ||
files_to_sign: 'Microsoft.Windows.AbiWinRT.*.nupkg' | ||
search_root: $(ob_outputDirectory)\packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
parameters: | ||
- name: "BuildConfiguration" | ||
type: string | ||
default: "release" | ||
- name: "BuildPlatform" | ||
type: string | ||
default: "x86" | ||
- name: OfficialBuild | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
- job: Build_ABI_Tool | ||
displayName: Build Binaries | ||
pool: | ||
type: windows | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)\out' | ||
ob_artifactSuffix: ${{ parameters.BuildConfiguration }}_${{ parameters.BuildPlatform }} | ||
StagingFolder: $(ob_outputDirectory) | ||
|
||
steps: | ||
|
||
- task: NuGetToolInstaller@1 | ||
displayName: Use NuGet 6.7 | ||
continueOnError: True | ||
inputs: | ||
versionSpec: 6.7 | ||
|
||
- task: CmdLine@2 | ||
displayName: Build Tools | ||
inputs: | ||
script: > | ||
if "%VSCMD_VER%"=="" ( | ||
pushd c: | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" >nul 2>&1 | ||
popd | ||
) | ||
build.cmd -v -b ${{ parameters.BuildConfiguration }} -f --build-version "$(Build.BuildNumber)" abi make_abiwinrt_nupkg | ||
workingDirectory: $(Build.SourcesDirectory)\src\scripts\windows | ||
failOnStderr: true | ||
|
||
- task: CopyFiles@2 | ||
displayName: Stage abi.* | ||
inputs: | ||
SourceFolder: $(Build.SourcesDirectory)\_build\Windows\${{ parameters.BuildPlatform }}\${{ parameters.BuildConfiguration }}\tool\abi | ||
Contents: >- | ||
abi.exe | ||
abi.pdb | ||
TargetFolder: $(ob_outputDirectory)\abi | ||
|
||
- task: onebranch.pipeline.signing@1 | ||
displayName: '🔒 Onebranch Signing for abi.exe' | ||
condition: eq(${{ parameters.OfficialBuild }}, 'true') | ||
inputs: | ||
command: sign | ||
signing_profile: external_distribution | ||
files_to_sign: '**/*.dll;**/*.exe' | ||
search_root: $(ob_outputDirectory)\abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
parameters: | ||
- name: OfficialBuild | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
- job: Build_MidlRT_Nuget | ||
displayName: Build MidlRT Package (Nuget) | ||
pool: | ||
type: windows | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)\out' | ||
ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }} | ||
PackageVersion: $(Build.BuildNumber) | ||
|
||
steps: | ||
|
||
- task: NuGetToolInstaller@1 | ||
displayName: Use NuGet 6.7 | ||
continueOnError: True | ||
inputs: | ||
versionSpec: 6.7 | ||
|
||
- task: NuGetCommand@2 | ||
displayName: Build NuGet | ||
inputs: | ||
command: pack | ||
searchPatternPack: src/package/midlrt/Microsoft.Windows.MidlRT.nuspec | ||
versioningScheme: byBuildNumber | ||
packDestination: $(ob_outputDirectory)\packages | ||
|
||
- task: onebranch.pipeline.signing@1 | ||
displayName: '🔒 Onebranch Signing for MidlRT nuget package' | ||
condition: eq(${{ parameters.OfficialBuild }}, 'true') | ||
inputs: | ||
command: sign | ||
signing_profile: external_distribution | ||
files_to_sign: 'Microsoft.Windows.MidlRT.*.nupkg' | ||
search_root: $(ob_outputDirectory)\packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
parameters: | ||
- name: "BuildConfiguration" | ||
type: string | ||
default: "release" | ||
- name: "BuildPlatform" | ||
type: string | ||
default: "x86" | ||
- name: 'debug' | ||
displayName: 'Enable debug output' | ||
type: boolean | ||
default: false | ||
|
||
variables: | ||
- template: Variables.yml | ||
parameters: | ||
debug: ${{ parameters.debug }} | ||
|
||
trigger: none | ||
|
||
name: $(MajorVersion).$(MinorVersion).$(date:yyMMdd)$(rev:.r) | ||
|
||
resources: | ||
repositories: | ||
- repository: templates | ||
type: git | ||
name: OneBranch.Pipelines/GovernedTemplates | ||
ref: refs/heads/main | ||
|
||
extends: | ||
template: v2/Microsoft.Official.yml@templates | ||
parameters: | ||
platform: | ||
name: 'windows_undocked' | ||
product: 'build_tools' | ||
|
||
cloudvault: | ||
enabled: false | ||
|
||
globalSdl: | ||
tsa: | ||
enabled: false | ||
|
||
nugetPublishing: | ||
feeds: | ||
name: xlang | ||
|
||
stages: | ||
- stage: stage | ||
pool: | ||
type: windows | ||
|
||
jobs: | ||
|
||
- template: .pipelines/Build-Job.yml@self | ||
parameters: | ||
BuildConfiguration: ${{ parameters.BuildConfiguration }} | ||
BuildPlatform: ${{ parameters.BuildPlatform }} | ||
OfficialBuild: true | ||
|
||
- job: Build_Internal_Packages | ||
displayName: Build Internal Packages (VPacks) | ||
condition: and(eq('${{ parameters.BuildPlatform }}', 'x86'), eq('${{ parameters.BuildConfiguration }}', 'release'), in(variables['Build.Reason'], 'Manual')) | ||
dependsOn: Build_ABI_Tool | ||
pool: | ||
type: windows | ||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)\x86\abi' | ||
|
||
ob_createvpack_enabled: true | ||
ob_createvpack_packagename: WinrtAbiTool | ||
ob_createvpack_owneralias: AmuseDev | ||
ob_createvpack_description: WinRT ABI Tool | ||
ob_createvpack_provData: true | ||
ob_createvpack_versionAs: parts | ||
ob_createvpack_majorVer: $(MajorVersion) | ||
ob_createvpack_minorVer: $(MinorVersion) | ||
ob_createvpack_patchVer: $(PatchVersion) | ||
ob_createvpack_metadata: $(Build.SourceBranchName).$(Build.BuildNumber).$(Build.SourceVersion) | ||
ob_createvpack_verbose: true | ||
ob_createvpack_target: $(OSBuildToolsRoot)\abi | ||
ob_createvpack_prereleaseVer: $(Build.SourceBranchName).${{ parameters.BuildPlatform }}.${{ parameters.BuildConfiguration }}.$(Build.BuildNumber).$(Build.SourceVersion) | ||
|
||
steps: | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
displayName: Download x86 Artifacts | ||
inputs: | ||
artifactName: drop_stage_Build_ABI_Toolrelease_x86 | ||
targetPath: $(Build.SourcesDirectory)\x86 | ||
|
||
- task: CmdLine@2 | ||
displayName: Parse PatchVersion | ||
inputs: | ||
script: 'for /f "tokens=3,4 delims=." %%i in ("$(Build.BuildNumber)") do @echo ##vso[task.setvariable variable=PatchVersion;]%%i%%j ' | ||
failOnStderr: true | ||
|
||
- ${{ if and(eq(parameters.BuildPlatform, 'x86'), eq(parameters.BuildConfiguration, 'release')) }}: | ||
- template: .pipelines/AbiWinRT-Job.yml@self | ||
parameters: | ||
OfficialBuild: true | ||
|
||
- template: .pipelines/MidlRT-Job.yml@self | ||
parameters: | ||
OfficialBuild: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
parameters: | ||
- name: "BuildConfiguration" | ||
type: string | ||
default: "release" | ||
- name: "BuildPlatform" | ||
type: string | ||
default: "x86" | ||
- name: 'debug' | ||
displayName: 'Enable debug output' | ||
type: boolean | ||
default: false | ||
|
||
variables: | ||
- template: Variables.yml | ||
parameters: | ||
debug: ${{ parameters.debug }} | ||
|
||
trigger: none | ||
|
||
name: $(MajorVersion).$(MinorVersion).$(date:yyMMdd)$(rev:.r)-PR | ||
|
||
resources: | ||
repositories: | ||
- repository: templates | ||
type: git | ||
name: OneBranch.Pipelines/GovernedTemplates | ||
ref: refs/heads/main | ||
|
||
extends: | ||
template: v2/Microsoft.NonOfficial.yml@templates | ||
parameters: | ||
platform: | ||
name: 'windows_undocked' | ||
product: 'build_tools' | ||
|
||
globalSdl: | ||
tsa: | ||
enabled: false | ||
sbom: | ||
enabled: true | ||
|
||
stages: | ||
- stage: stage | ||
pool: | ||
type: windows | ||
|
||
jobs: | ||
|
||
- template: .pipelines/Build-Job.yml@self | ||
parameters: | ||
BuildConfiguration: ${{ parameters.BuildConfiguration }} | ||
BuildPlatform: ${{ parameters.BuildPlatform }} | ||
OfficialBuild: false | ||
|
||
- ${{ if and(eq(parameters.BuildPlatform, 'x86'), eq(parameters.BuildConfiguration, 'release')) }}: | ||
- template: .pipelines/AbiWinRT-Job.yml@self | ||
parameters: | ||
OfficialBuild: false | ||
|
||
- template: .pipelines/MidlRT-Job.yml@self | ||
parameters: | ||
OfficialBuild: false |
Oops, something went wrong.