Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"azureisv",
"azurekeyvault",
"managedlustre",
"azuremanagedlustre",
"azuremcp",
"azuremcpserver",
"azureopenai",
Expand Down Expand Up @@ -350,6 +351,7 @@
"brazilsoutheast",
"breathability",
"burstable",
"buildable",
"byol",
"canadacentral",
"canadaeast",
Expand Down
8 changes: 7 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@
<_RelativeProjectDir>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)').Replace($([System.IO.Path]::GetFullPath('$(RepoRoot)')), ''))</_RelativeProjectDir>
<IsServerProject Condition="'$(IsServerProject)' == '' and $(_RelativeProjectDir.StartsWith('servers')) and $(_RelativeProjectDir.EndsWith('src'))">true</IsServerProject>
</PropertyGroup>

<PropertyGroup Condition="'$(BuildNative)' == 'true'">
<DefineConstants>$(DefineConstants);BUILD_NATIVE</DefineConstants>
</PropertyGroup>

<!-- Windows AOT native build security flags to enable 'Control Flow Guard' (CFG) -->
<PropertyGroup Condition="'$(BuildNative)' == 'true' and $(RuntimeIdentifier.StartsWith('win'))">
<ControlFlowGuard>Guard</ControlFlowGuard>
</PropertyGroup>

<PropertyGroup Condition="'$(IsServerProject)' == 'true'">
<!-- .NET Tool Package settings -->
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageType>McpServer</PackageType>
<PackageIcon>$(RepoRoot)eng/images/microsofticon.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Keep these aligned with OS + arch build-matrix.json. -->
Expand All @@ -34,9 +38,11 @@
<DebugSymbols>true</DebugSymbols>
<CopyOutputSymbolsToPublishDirectory>true</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>

<PropertyGroup Condition="'$(IsServerProject)' == 'true' and '$(RuntimeIdentifier)' == ''">
<McpServerJsonTemplateFile>$(RepoRoot)/eng/dnx/.mcp/server.json</McpServerJsonTemplateFile>
<McpServerJsonTemplateFile>$(RepoRoot)eng/dnx/.mcp/server.json</McpServerJsonTemplateFile>
</PropertyGroup>

<PropertyGroup Condition="'$(IsServerProject)' == 'true' and '$(BuildNative)' == 'true'">
<!-- AOT native build flags -->
<IsAotCompatible>true</IsAotCompatible>
Expand Down
Binary file removed eng/images/azureicon.png
Binary file not shown.
13 changes: 0 additions & 13 deletions eng/pipelines/build-matrix.json

This file was deleted.

57 changes: 15 additions & 42 deletions eng/pipelines/templates/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ parameters:
- name: PublishTarget
type: string
default: none
values:
- internal
- public
- none
values: [none, internal, public ]
- name: RunLiveTests
type: boolean
default: false
Expand Down Expand Up @@ -48,8 +45,10 @@ extends:
jobs:
- template: /eng/pipelines/templates/jobs/initialize.yml
parameters:
DynamicPrereleaseVersion: ${{ or(ne(parameters.PublishTarget, 'public'), parameters.IsTestPipeline) }}
ServerName: ${{ parameters.ServerName }}
PublishTarget: ${{ parameters.PublishTarget }}
IncludeNative: ${{ parameters.IncludeNative }}
IsTestPipeline: ${{ parameters.IsTestPipeline }}

- stage: Build
dependsOn:
Expand All @@ -61,25 +60,18 @@ extends:
variables:
- template: /eng/pipelines/templates/variables/image.yml
- template: /eng/pipelines/templates/variables/globals.yml
- name: VersionSuffix
value: $[ stageDependencies.Initialize.Initialize.outputs['GetVersion.VersionSuffix'] ]
jobs:
- template: /eng/pipelines/templates/jobs/analyze.yml
parameters:
ServerName: ${{ parameters.ServerName }}
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
SparseCheckout: false
JobTemplatePath: /eng/pipelines/templates/jobs/build.yml
AdditionalParameters:

- ${{ each os in split('linux|windows|macOS', '|') }}:
- template: /eng/pipelines/templates/jobs/build.yml
parameters:
TestTimeoutInMinutes: 30
ServerName: ${{ parameters.ServerName }}
PublishTarget: ${{ parameters.PublishTarget }}
MatrixConfigs:
- Name: build_matrix
Path: eng/pipelines/build-matrix.json
Selection: all
GenerateVMJobs: true
OSName: ${{ os }}
Matrix: stageDependencies.Initialize.Initialize.outputs['CreateBuildInfo.${{ os }}BuildMatrix']
MaxParallel: 4

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.RunLiveTests, 'true')) }}:
- stage: Test
Expand All @@ -95,6 +87,10 @@ extends:
- template: /eng/pipelines/templates/variables/globals.yml
jobs:
- template: /eng/pipelines/templates/jobs/live-test.yml
parameters:
Matrix: stageDependencies.Initialize.Initialize.outputs['CreateBuildInfo.liveTestMatrix']
MaxParallel: 10
TimeoutInMinutes: 75

- ${{ if ne(parameters.PublishTarget, 'none') }}:
# We only sign if we're going to publish
Expand All @@ -110,27 +106,10 @@ extends:
variables:
- template: /eng/pipelines/templates/variables/image.yml
- template: /eng/pipelines/templates/variables/globals.yml
- name: VersionSuffix
value: $[ stageDependencies.Initialize.Initialize.outputs['GetVersion.VersionSuffix'] ]
jobs:
- template: /eng/pipelines/templates/jobs/sign-and-pack.yml
parameters:
ServerName: ${{ parameters.ServerName }}
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
DependsOn:
- PackNpm
- PackNuget
SparseCheckout: false
JobTemplatePath: /eng/pipelines/templates/jobs/verify-packages.yml
AdditionalParameters:
TestTimeoutInMinutes: 10
ServerName: ${{ parameters.ServerName }}
MatrixConfigs:
- Name: build_matrix
Path: eng/pipelines/build-matrix.json
Selection: all
GenerateVMJobs: true

- ${{ if eq(parameters.PublishTarget, 'public') }}:
- stage: Release
Expand All @@ -144,8 +123,6 @@ extends:
variables:
- template: /eng/pipelines/templates/variables/image.yml
- template: /eng/pipelines/templates/variables/globals.yml
- name: VersionSuffix
value: $[ stageDependencies.Initialize.Initialize.outputs['GetVersion.VersionSuffix'] ]
jobs:
- template: /eng/pipelines/templates/jobs/release.yml
parameters:
Expand All @@ -166,9 +143,5 @@ extends:
variables:
- template: /eng/pipelines/templates/variables/image.yml
- template: /eng/pipelines/templates/variables/globals.yml
- name: VersionSuffix
value: $[ stageDependencies.Initialize.Initialize.outputs['GetVersion.VersionSuffix'] ]
jobs:
- template: /eng/pipelines/templates/jobs/integration.yml
parameters:
ServerName: ${{ parameters.ServerName }}
11 changes: 2 additions & 9 deletions eng/pipelines/templates/jobs/analyze.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
parameters:
- name: TimeoutInMinutes
type: number
default: 120
- name: ServerName
type: string

jobs:
- job: Analyze
condition: and(succeededOrFailed(), ne(variables['Skip.Analyze'], 'true'))
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
timeoutInMinutes: 120
dependsOn: []
steps:
- checkout: self
Expand Down Expand Up @@ -40,7 +33,7 @@ jobs:
sourceDirectory: $(Build.SourcesDirectory)

- template: /eng/common/pipelines/templates/steps/check-spelling.yml

- template: /eng/common/pipelines/templates/steps/verify-links.yml
parameters:
Condition: succeededOrFailed()
Expand Down
90 changes: 29 additions & 61 deletions eng/pipelines/templates/jobs/build.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
parameters:
# required matrix parameters
- name: UsePlatformContainer
type: boolean
- name: OSName
type: string
- name: Matrix
type: object
- name: DependsOn
type: string
- name: CloudConfig
type: object
- name: TestTimeoutInMinutes
type: number
- name: ServerName
type: string
- name: PublishTarget
type: string
default: none
values:
- internal
- public
- none
- name: OSName
type: string
- name: Matrix
type: string
- name: MaxParallel
type: number

jobs:
- job: Build_${{ parameters.OSName }}
displayName: "Build"
dependsOn:
- ${{ parameters.DependsOn }}
condition: and(succeeded(), ne(${{ parameters.Matrix }}, '{}'))
strategy:
maxParallel: ${{ parameters.MaxParallel }}
matrix: $[ ${{ parameters.Matrix }} ]
pool:
name: $(Pool)
Expand All @@ -46,6 +37,10 @@ jobs:
enabled: true

steps:
- download: current
artifact: build_info
displayName: 'Download build info artifact'

- checkout: self

- task: UseDotNet@2
Expand All @@ -62,32 +57,22 @@ jobs:
version: 9.0.x

- task: Powershell@2
displayName: "(Trimmed) Build module"
displayName: "Build code"
condition: and(succeeded(), ne(variables['NoPackagesChanged'],'true'))
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Build-Code.ps1
${{ if ne(parameters.PublishTarget, 'none') }}:
arguments: >
-ServerName '${{ parameters.ServerName }}'
-OutputPath '$(Build.ArtifactStagingDirectory)'
-VersionSuffix '$(VersionSuffix)'
-OperatingSystem '${{ parameters.OSName }}'
-Architecture '$(Architecture)'
-SelfContained
-Trimmed
-SingleFile
-ReleaseBuild
${{ else }}:
arguments: >
-ServerName '${{ parameters.ServerName }}'
-OutputPath '$(Build.ArtifactStagingDirectory)'
-VersionSuffix '$(VersionSuffix)'
-OperatingSystem '${{ parameters.OSName }}'
-Architecture '$(Architecture)'
-SelfContained
-Trimmed
-SingleFile
arguments: >
-ServerName '${{ parameters.ServerName }}'
-BuildInfoPath '$(Pipeline.Workspace)/build_info/build_info.json'
-OutputPath '$(Build.ArtifactStagingDirectory)'
-OperatingSystem '${{ parameters.OSName }}'
-Architecture '$(Architecture)'
-Native:$$(Native)
-ReleaseBuild:$${{ ne(parameters.PublishTarget, 'none') }}
-SelfContained
-Trimmed
-SingleFile

- task: Powershell@2
displayName: "Run tests"
Expand Down Expand Up @@ -116,23 +101,12 @@ jobs:
inputs:
summaryFileLocation: $(CoverageFile)

- task: Powershell@2
displayName: "(Native AOT) Build module"
condition: and(succeeded(), ne(variables['NoPackagesChanged'],'true'), eq('${{ parameters.OSName }}', 'linux'), eq(variables['Architecture'], 'x64'))
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Build-Code.ps1
arguments: >
-ServerName '${{ parameters.ServerName }}'
-OutputPath '$(Build.ArtifactStagingDirectory)'
-VersionSuffix '$(VersionSuffix)'
-OperatingSystem '${{ parameters.OSName }}'
-Architecture '$(Architecture)'
-CleanBuild
-BuildNative
-ReleaseBuild
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: binaries_$(System.JobName)

# --- VS Code Extension Packaging Steps ---
# --- VS Code Extension Component Detection ---
- task: NodeTool@0
displayName: "Use Node.js 20.x"
inputs:
Expand All @@ -150,9 +124,3 @@ jobs:

- task: ComponentGovernanceComponentDetection@0
displayName: "Component Governance Detection"

- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: build_$(System.JobName)
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}
Loading
Loading