зеркало из https://github.com/microsoft/xlang.git
Add updated pipeline (#793)
This commit is contained in:
Родитель
f23fb4b03e
Коммит
79a3ad2db8
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,68 @@
|
|||
# Sync branches in a mirror repository to a base repo by running this pipeline
|
||||
# from the mirror repo, and supplying the base repo as a parameter
|
||||
name: $(BuildDefinitionName)_$(date:yyMMdd)$(rev:.r)
|
||||
|
||||
parameters:
|
||||
- name: "SourceToTargetBranches"
|
||||
type: object
|
||||
default:
|
||||
master: master
|
||||
- name: "SourceRepository"
|
||||
type: string
|
||||
default: "https://github.com/microsoft/xlang.git"
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
pool:
|
||||
name: Azure-Pipelines-1ESPT-ExDShared
|
||||
image: windows-2022
|
||||
os: windows
|
||||
customBuildTags:
|
||||
- ES365AIMigrationTooling
|
||||
stages:
|
||||
- stage: stage
|
||||
jobs:
|
||||
- job: SyncMirror
|
||||
strategy:
|
||||
matrix:
|
||||
${{ each branches in parameters.SourceToTargetBranches }}:
|
||||
${{ branches.key }}:
|
||||
SourceBranch: ${{ branches.key }}
|
||||
TargetBranch: ${{ branches.value }}
|
||||
dependsOn: []
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
|
||||
- task: PowerShell@2
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
Write-Host "SourceBranch " + "$(SourceBranch)"
|
||||
Write-Host "TargetBranch " + "$(TargetBranch)"
|
||||
|
||||
$repo = "${{ parameters.SourceRepository }}"
|
||||
git remote add sourcerepo $repo
|
||||
git remote
|
||||
|
||||
$target = "$(TargetBranch)"
|
||||
git fetch origin $target
|
||||
git checkout $target
|
||||
git pull origin $target
|
||||
|
||||
$source = "$(SourceBranch)"
|
||||
git fetch sourcerepo $source
|
||||
git pull sourcerepo $source
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
git push
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
variables:
|
||||
MajorVersion: "2"
|
||||
MinorVersion: "0"
|
||||
ENABLE_PRS_DELAYSIGN: 1
|
||||
# Docker image which is used to build the project https://aka.ms/obpipelines/containers
|
||||
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'
|
||||
system.debug: ${{ parameters.debug }}
|
|
@ -25,5 +25,10 @@ else()
|
|||
target_link_libraries(abi -lpthread)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(abi PUBLIC /guard:cf /Qspectre /sdl)
|
||||
target_link_options(abi PUBLIC /guard:cf /DYNAMICBASE /CETCOMPAT /debugtype:cv,fixup)
|
||||
endif()
|
||||
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/abi.exe" abiwinrt_exe)
|
||||
set_target_properties(abi PROPERTIES "abiwinrt_exe" ${abiwinrt_exe})
|
||||
set_target_properties(abi PROPERTIES "abiwinrt_exe" ${abiwinrt_exe})
|
Загрузка…
Ссылка в новой задаче