Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0930c17
ci: add 1ES official build pipeline for ModelKit
timenick Apr 14, 2026
7be1647
ci: skip GitHub workflows when only .pipelines/ files change
timenick Apr 14, 2026
5a243c0
ci: switch to OneBranch template with manual trigger and Azure Artifa…
timenick Apr 14, 2026
9c29809
ci: address review feedback — Build depends on Test, safer license ch…
timenick Apr 14, 2026
765c8e4
ci: add ob_outputDirectory to all jobs for OneBranch compatibility
timenick Apr 14, 2026
412c4a3
ci: add OneBranch container image and feature flags from reference pi…
timenick Apr 14, 2026
dac8d9a
ci: merge into single stage with Lint, Test, Build jobs
timenick Apr 14, 2026
14a1f04
ci: remove UsePythonVersion task, use container pre-installed Python
timenick Apr 14, 2026
6f9ce75
ci: remove pre-commit license check, keep ruff only for OneBranch lint
timenick Apr 14, 2026
9076ba4
ci: add workingDirectory to all script steps for OneBranch container
timenick Apr 14, 2026
d473c13
ci: use absolute paths for ruff and add debug dir listing
timenick Apr 14, 2026
9e950f1
ci: rewrite pipeline following OneBranch patterns — no checkout, no w…
timenick Apr 14, 2026
eb9b8d5
ci: use unique ob_outputDirectory per job to avoid artifact name coll…
timenick Apr 14, 2026
b1d0e86
ci: temporarily keep only Build job to validate wheel packaging
timenick Apr 14, 2026
7a77f4b
Merge remote-tracking branch 'origin/main' into zhiwang/1es-official-…
timenick Apr 14, 2026
b99345c
ci: remove twine check due to PEP 639 license-file compatibility issue
timenick Apr 14, 2026
d469481
ci: add twine check back with continueOnError for diagnostics
timenick Apr 14, 2026
138fd5e
ci: add DownloadRules job to fetch runtime check rules from ModelKitA…
timenick Apr 14, 2026
b1a48e0
ci: debug listing to find artifacts checkout path
timenick Apr 14, 2026
1482b3e
ci: fix artifacts checkout path to ModelKitArtifacts
timenick Apr 14, 2026
4631be3
ci: add DownloadRules job with parameterized artifacts branch
timenick Apr 14, 2026
ea07842
ci: remove artifactsBranch parameter, use ADO UI resource branch picker
timenick Apr 14, 2026
43d62c4
ci: add debug step to verify rules are downloaded before wheel build
timenick Apr 14, 2026
56c31e9
Merge remote-tracking branch 'origin/main' into zhiwang/1es-official-…
timenick Apr 14, 2026
8ee4ff8
ci: enable LFS for artifacts checkout and remove debug step
timenick Apr 14, 2026
15dea57
ci: use absolute path for DownloadPipelineArtifact targetPath
timenick Apr 14, 2026
bb97090
ci: merge build into single job and fix license format (#349)
timenick Apr 14, 2026
98cb9e8
ci: create ob_outputDirectory before copying rules
timenick Apr 14, 2026
c0302d9
revert: restore original license format in pyproject.toml
timenick Apr 14, 2026
2eb095d
Merge branch 'main' into zhiwang/1es-official-build
timenick Apr 15, 2026
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
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Lint
on:
pull_request:
branches: [main]
paths-ignore:
- '.pipelines/**'
push:
branches: [main]
paths-ignore:
- '.pipelines/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/modelkit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: ModelKit CI
on:
pull_request:
branches: [main]
paths-ignore:
- '.pipelines/**'
push:
branches: [main]
paths-ignore:
- '.pipelines/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
99 changes: 99 additions & 0 deletions .pipelines/modelkit-official-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#################################################################################
# OneBranch Pipelines #
# This pipeline was created by EasyStart from a sample located at: #
# https://aka.ms/obpipelines/easystart/samples #
# Documentation: https://aka.ms/obpipelines #
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
# Retail Tasks: https://aka.ms/obpipelines/tasks #
# Support: https://aka.ms/onebranchsup #
#################################################################################

trigger: none # https://aka.ms/obpipelines/triggers

parameters: # parameters are shown up in ADO UI in a build queue time
- name: 'debug'
displayName: 'Enable debug output'
type: boolean
default: false

variables:
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
DEBIAN_FRONTEND: noninteractive
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' # https://aka.ms/obpipelines/containers

resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
- repository: artifacts
type: github
name: gim-home/ModelKitArtifacts
endpoint: github.com_yuesu_microsoft
ref: refs/heads/main

extends:
template: v2/OneBranch.Official.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
parameters:
git:
fetchDepth: -1
featureFlags:
EnableCDPxPAT: false
WindowsHostVersion:
Version: '2022'
Network: KS1
networkisolation:
policy: Permissive,CFSClean
globalSdl:
tsa:
enabled: false

stages:
- stage: Build
displayName: 'Build Python Package'
dependsOn: []
jobs:
- job: BuildWheel
displayName: 'Build'
pool:
type: windows

variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
ob_artifactBaseName: 'drop'

steps:
- checkout: artifacts
fetchDepth: 1
lfs: true

- script: python --version
displayName: 'Check Python version'

- powershell: |
$rulesDir = "$(Build.SourcesDirectory)\ModelKitArtifacts\op_check_results\rules"
$destDir = "$(Build.SourcesDirectory)\src\winml\modelkit\analyze\rules\runtime_check_rules"
$outDir = "$(ob_outputDirectory)"
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
$zips = Get-ChildItem "$rulesDir\*.zip"
Write-Host "Found $($zips.Count) rule zips"
$zips | Copy-Item -Destination $destDir
$zips | Copy-Item -Destination $outDir
Write-Host "Copied $($zips.Count) rule zips to $destDir and $outDir"
displayName: 'Copy runtime check rules'

- task: PipAuthenticate@1
inputs:
artifactFeeds: 'windows.ai.toolkit/Modelkit'
displayName: 'Authenticate pip with Azure Artifacts'

- script: pip install build twine
displayName: 'Install build tools'

- script: python -m build --outdir "$(ob_outputDirectory)"
displayName: 'Build sdist and wheel'

- script: twine check "$(ob_outputDirectory)\*"
continueOnError: true
displayName: 'Validate packages for PyPI'
Loading