Skip to content

Commit 161598f

Browse files
committed
Public release commit
0 parents  commit 161598f

1,054 files changed

Lines changed: 99647 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# Instruct Cargo to use the Azure Artifacts feed instead of crates.io for pulling public crates
3+
# in ADO pipelines. This file is copied to the `<repo-root>/src` folder during rust pipeline builds.
4+
# See: https://eng.ms/docs/more/languages-at-microsoft/rust/articles/gettingstarted/install/installcicd
5+
# See: https://eng.ms/docs/coreai/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/buildworkflows/rust
6+
7+
[registries]
8+
Mxc-Azure-Feed = { index = "sparse+https://microsoft.pkgs.visualstudio.com/Dart/_packaging/Mxc-Azure-Feed/Cargo/index/" }
9+
10+
[source.crates-io]
11+
replace-with = "Mxc-Azure-Feed"
12+
13+
# Add linker for arm64 on linux for cross-compilation
14+
[target.aarch64-unknown-linux-gnu]
15+
linker = "aarch64-linux-gnu-gcc"

.azure-pipelines/.npm/.npmrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; Used in azure pipelines to point to our azure artifacts feed for npm packages.
2+
; See README.md in <repo-root>/.azure-pipelines/ for more details on Central Feeds Services.
3+
; This file is copied to the '<repo-root>/sdk' folder during npm pipeline builds.
4+
registry=https://microsoft.pkgs.visualstudio.com/Dart/_packaging/Mxc-Azure-Feed/npm/registry/
5+
6+
always-auth=true

.azure-pipelines/1ES.Build.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# Push trigger on `main` exists primarily to populate the Azure Pipelines
5+
# target-dir and CARGO_HOME cache scopes for the default branch. PR-triggered
6+
# runs are branch-scoped on writes and cannot populate `main`'s scope; they
7+
# can only *read* from it as a fallback. Without a `main` trigger, the
8+
# 1ES `cacheOptions.enableTargetCache: true` configuration in
9+
# `Rust.Build.Job.yml` runs every PR with a cold target dir — the
10+
# auto-generated wildcard restore key (visible in the `🎯 Cache target
11+
# directory` task log as `…|Rust=<ver>|**`) finds no prior entry in
12+
# main's scope, so each PR build does a fully cold cargo compile
13+
# (~14 min on x64 WXC).
14+
#
15+
# After this trigger is enabled, the first push to `main` populates the
16+
# cache; every subsequent PR's restore step finds it via that wildcard
17+
# fallback and the cargo build step drops to a few minutes.
18+
#
19+
# Docs-only commits to `main` don't need to rebuild the whole workspace,
20+
# so the path exclusion list here matches the one added to the `pr:`
21+
# trigger in PR #396 (kept in sync intentionally — if that PR lands and
22+
# the lists drift, reconcile them).
23+
trigger:
24+
branches:
25+
include:
26+
- main
27+
paths:
28+
exclude:
29+
- 'docs/**'
30+
- 'tests/examples/**'
31+
- '.github/ISSUE_TEMPLATE/**'
32+
- '.github/PULL_REQUEST_TEMPLATE.md'
33+
- '.github/copilot-instructions.md'
34+
- '.github/instructions/**'
35+
- '**/*.md'
36+
- '.editorconfig'
37+
38+
name: $(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
39+
40+
pr:
41+
branches:
42+
include:
43+
- main
44+
- feature/*
45+
- user/*
46+
# Skip the full build pipeline when a PR only touches documentation /
47+
# non-shipping content. Any change outside this exclusion list still
48+
# triggers the pipeline as before. Keep this list conservative — exclude
49+
# only paths that cannot possibly affect built artifacts or test behavior.
50+
paths:
51+
exclude:
52+
- 'docs/**'
53+
- 'tests/examples/**'
54+
- '.github/ISSUE_TEMPLATE/**'
55+
- '.github/PULL_REQUEST_TEMPLATE.md'
56+
- '.github/copilot-instructions.md'
57+
- '.github/instructions/**'
58+
- '**/*.md'
59+
- '.editorconfig'
60+
61+
resources:
62+
repositories:
63+
- repository: 1ESPipelineTemplates
64+
type: git
65+
name: 1ESPipelineTemplates/1ESPipelineTemplates
66+
ref: refs/tags/release
67+
68+
parameters:
69+
- name: officialBuild
70+
displayName: Build Official or Unofficial
71+
type: string
72+
default: Unofficial
73+
values:
74+
- Official
75+
- Unofficial
76+
77+
- name: debug
78+
displayName: Enable debug output for SDK tests
79+
type: boolean
80+
default: false
81+
82+
# Reused by Rust/Mac/NpmSdk templates. Values come from MXC-ESRP-Signing
83+
# on Official runs; sign steps are gated, so missing values on Unofficial
84+
# runs are harmless.
85+
- name: ESRPInfo
86+
type: object
87+
default:
88+
serviceName: $(serviceName)
89+
tenantId: $(tenantId)
90+
azureKeyVaultName: $(azureKeyVaultName)
91+
authCertName: $(authCertName)
92+
signCertName: $(signCertName)
93+
clientId: $(clientId)
94+
95+
variables:
96+
# Prevents failure when no Rust tests are found; pipeline runs will still fail if present
97+
# tests do not pass.
98+
- name: NEXTEST_NO_TESTS
99+
value: pass
100+
- ${{ if eq(parameters.officialBuild, 'Official') }}:
101+
- group: MXC-ESRP-Signing
102+
103+
extends:
104+
template: v1/1ES.${{parameters.officialBuild}}.PipelineTemplate.yml@1ESPipelineTemplates
105+
parameters:
106+
pool:
107+
name: Azure-Pipelines-1ESPT-ExDShared
108+
image: windows-2022
109+
os: windows
110+
111+
customBuildTags:
112+
- ES365AIMigrationTooling
113+
114+
stages:
115+
- stage: Build_Binaries
116+
displayName: 'Build Executables'
117+
jobs:
118+
119+
# Build Binaries for all targets in parallel
120+
- template: .azure-pipelines/templates/Rust.Build.Job.yml@self
121+
parameters:
122+
isOfficialBuild: ${{ eq(parameters.officialBuild, 'Official') }}
123+
matrix:
124+
- name: windows_x64
125+
os: windows
126+
arch: x64
127+
component: WXC
128+
- name: windows_arm64
129+
os: windows
130+
arch: arm64
131+
component: WXC
132+
- name: linux_x64
133+
os: linux
134+
arch: x64
135+
component: LXC
136+
- name: linux_arm64
137+
os: linux
138+
arch: arm64
139+
component: LXC
140+
141+
ESRPInfo: ${{ parameters.ESRPInfo }}
142+
143+
# macOS uses a separate template because it runs on a different
144+
# pool (Microsoft-hosted). The produced artifact name follows the same
145+
# scheme (mxc-binaries-<triplet>) so Package_MXC_NPM_SDK can consume it.
146+
- template: .azure-pipelines/templates/Mac.Build.Job.yml@self
147+
parameters:
148+
isOfficialBuild: ${{ eq(parameters.officialBuild, 'Official') }}
149+
ESRPInfo: ${{ parameters.ESRPInfo }}
150+
151+
- stage: Package_MXC
152+
displayName: 'Package MXC'
153+
dependsOn: Build_Binaries
154+
jobs:
155+
- template: .azure-pipelines/templates/Package.NpmSdk.Job.yml@self
156+
parameters:
157+
targets:
158+
- artifact: wxc-binaries-x86_64-pc-windows-msvc
159+
sdkArch: x64
160+
- artifact: wxc-binaries-aarch64-pc-windows-msvc
161+
sdkArch: arm64
162+
- artifact: lxc-binaries-x86_64-unknown-linux-gnu
163+
sdkArch: x64
164+
- artifact: lxc-binaries-aarch64-unknown-linux-gnu
165+
sdkArch: arm64
166+
- artifact: mxc-binaries-aarch64-apple-darwin
167+
sdkArch: arm64
168+
169+
ESRPInfo: ${{ parameters.ESRPInfo }}
170+
171+
- template: .azure-pipelines/templates/Mxc.Binary.Packaging.Job.yml@self
172+
173+
- stage: Lint
174+
displayName: 'Lint'
175+
dependsOn: []
176+
jobs:
177+
- template: .azure-pipelines/templates/Lint.Job.yml@self
178+
179+
- stage: SDK_Unit_Tests
180+
displayName: 'SDK Unit Tests'
181+
dependsOn: []
182+
jobs:
183+
- template: .azure-pipelines/templates/SDK.Unit.Test.Job.yml@self
184+
parameters:
185+
debug: ${{ parameters.debug }}
186+
187+
- stage: SDK_Integration_Tests
188+
displayName: 'SDK Integration Tests'
189+
dependsOn: Package_MXC
190+
jobs:
191+
- template: .azure-pipelines/templates/SDK.Integration.Test.Job.yml@self
192+
parameters:
193+
debug: ${{ parameters.debug }}

.azure-pipelines/1ES.Release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
trigger: none
5+
name: $(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
6+
resources:
7+
repositories:
8+
- repository: 1ESPipelineTemplates
9+
type: git
10+
name: 1ESPipelineTemplates/1ESPipelineTemplates
11+
ref: refs/tags/release
12+
pipelines:
13+
# Reference pipeline that created the signed npm artifacts so we can consume them later
14+
- pipeline: MXC
15+
source: 'MXC-Official-Build'
16+
trigger: none
17+
18+
19+
# Parameters for ESRP release info will be passed from the ADO UI.
20+
parameters:
21+
- name: ESRPInfo
22+
type: object
23+
default:
24+
serviceName: ''
25+
tenantId: ''
26+
azureKeyVaultName: ''
27+
authCertName: ''
28+
signCertName: ''
29+
clientId: ''
30+
ApproversEmail: ''
31+
OwnersEmail: ''
32+
33+
extends:
34+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
35+
parameters:
36+
pool:
37+
name: Azure-Pipelines-1ESPT-ExDShared
38+
image: windows-2022
39+
os: windows
40+
customBuildTags:
41+
- ES365AIMigrationTooling
42+
43+
sdl:
44+
sourceAnalysisPool:
45+
name: Azure-Pipelines-1ESPT-ExDShared
46+
image: windows-latest
47+
os: windows
48+
49+
stages:
50+
- stage: Publish_to_NPM
51+
displayName: 'Publish NPM Package'
52+
variables:
53+
- name: release_environment
54+
value: Production
55+
jobs:
56+
- job: ReleaseJob
57+
templateContext:
58+
type: releaseJob
59+
isProduction: true
60+
inputs:
61+
- input: pipelineArtifact
62+
pipeline: MXC
63+
targetPath: '$(Pipeline.Workspace)/packages'
64+
artifactName: mxc-npm-sdk-package
65+
66+
displayName: Publish to NPM
67+
steps:
68+
- task: EsrpRelease@10
69+
displayName: 'Publish to NPM'
70+
inputs:
71+
connectedservicename: ${{ parameters.ESRPInfo.serviceName }}
72+
usemanagedidentity: false
73+
keyvaultname: ${{ parameters.ESRPInfo.azureKeyVaultName }}
74+
authcertname: ${{ parameters.ESRPInfo.authCertName }}
75+
signcertname: ${{ parameters.ESRPInfo.signCertName }}
76+
clientid: ${{ parameters.ESRPInfo.clientId }}
77+
intent: 'PackageDistribution'
78+
contenttype: npm
79+
contentsource: 'Folder'
80+
folderlocation: '$(Pipeline.Workspace)/packages'
81+
owners: ${{ parameters.ESRPInfo.OwnersEmail }}
82+
approvers: ${{ parameters.ESRPInfo.ApproversEmail }}
83+
waitforreleasecompletion: true
84+
serviceendpointurl: 'https://api.esrp.microsoft.com'
85+
mainpublisher: ESRPRELPACMAN
86+
domaintenantid: ${{ parameters.ESRPInfo.tenantId }}
87+
88+

.azure-pipelines/Fuzz.Build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
#
4+
# Daily fuzzing pipeline for MXC.
5+
#
6+
# Builds the mxc_fuzz crate with AddressSanitizer and submits the resulting
7+
# drop directory to OneFuzz. Bugs found are filed against the SDL fuzzing
8+
# work item 62294501 via the routing fields in src/testing/fuzz/OneFuzzConfig.json.
9+
#
10+
# Schedule: daily at 00:00 UTC on `main`. PRs do not trigger this pipeline.
11+
12+
pr: none
13+
trigger: none
14+
15+
schedules:
16+
- cron: "0 0 * * *"
17+
displayName: Daily fuzzing submission
18+
branches:
19+
include:
20+
- main
21+
always: true
22+
23+
name: $(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
24+
25+
resources:
26+
repositories:
27+
- repository: 1ESPipelineTemplates
28+
type: git
29+
name: 1ESPipelineTemplates/1ESPipelineTemplates
30+
ref: refs/tags/release
31+
32+
extends:
33+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
34+
parameters:
35+
pool:
36+
name: Azure-Pipelines-1ESPT-ExDShared
37+
image: windows-latest
38+
os: windows
39+
40+
customBuildTags:
41+
- ES365AIMigrationTooling
42+
43+
stages:
44+
- stage: Fuzz
45+
displayName: 'Build + submit fuzzers'
46+
jobs:
47+
- template: .azure-pipelines/templates/Fuzz.Build.Job.yml@self

.azure-pipelines/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Configuration Strategy
2+
3+
## For Developers
4+
5+
Developers should to use public registries like `crates.io`
6+
and `npmjs` directly so they can iterate quickly.
7+
8+
## For CI/Pipelines
9+
10+
### Central Feed Services
11+
Production CI pipelines use an Azure Artifacts feed (CFS) to source dependencies
12+
from crates.io and npmjs, helping ensure secure and vetted consumption of third‑party packages.
13+
(Microsoft engineers can consult the internal "Central Feed Services" documentation for setup details; external readers can treat the centralized feed as a Microsoft-internal Azure Artifacts mirror of the public registries.)
14+
15+
### Production Build and Release pipelines
16+
- We use Azure pipelines for official builds with signing and public releases.
17+
18+
### PR Pipelines
19+
- We use github actions but will be consolidated to use the azure pipelines which
20+
contain governance tasks, like binary scanning etc in the future.

0 commit comments

Comments
 (0)