Skip to content

Commit 18adbf7

Browse files
jchen351justinchubyCopilot
authored
Make onnxscript release 1ES compliant (#2071)
Co-authored-by: Justin Chu <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 96447fb commit 18adbf7

File tree

5 files changed

+77
-33
lines changed

5 files changed

+77
-33
lines changed

.azure-pipelines/_release-template.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.azure-pipelines/release-dev.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,28 @@
33
# To configure triggers, see https://github.com/microsoft/onnx-converters-private/wiki/ONNX-Script-release
44
trigger: none
55

6-
pool:
7-
vmImage: ubuntu-latest
86
variables:
97
CI: 'true'
10-
steps:
11-
- template: _release-template.yml
8+
9+
resources:
10+
repositories:
11+
- repository: 1esPipelines
12+
type: git
13+
name: 1ESPipelineTemplates/1ESPipelineTemplates
14+
ref: refs/tags/release
15+
16+
extends:
17+
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
18+
# For non-production pipelines, use "Unofficial" as defined below.
19+
# For productions pipelines, use "Official".
20+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
21+
parameters:
22+
sdl:
23+
sourceAnalysisPool:
24+
name: onnxruntime-Win-CPU-2022
25+
os: windows
26+
pool:
27+
name: 'onnxruntime-Ubuntu2204-AMD-CPU'
28+
os: 'linux'
29+
stages:
30+
- template: stages/release-stage.yml

.azure-pipelines/release.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@
22

33
trigger: none
44

5-
pool:
6-
vmImage: ubuntu-latest
75
variables:
86
CI: 'true'
97
# Set the release environment variable to build a release version of the wheel
108
ONNX_SCRIPT_RELEASE: 1
11-
steps:
12-
- template: _release-template.yml
13-
# Test the wheels. This needs to happen after PublishBuildArtifacts
14-
# to avoid interference with the artifacts
15-
- script: python -m pip install dist/*.whl --no-deps
16-
displayName: 'Install wheel'
9+
10+
resources:
11+
repositories:
12+
- repository: 1esPipelines
13+
type: git
14+
name: 1ESPipelineTemplates/1ESPipelineTemplates
15+
ref: refs/tags/release
16+
17+
extends:
18+
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
19+
# For non-production pipelines, use "Unofficial" as defined below.
20+
# For productions pipelines, use "Official".
21+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
22+
parameters:
23+
sdl:
24+
sourceAnalysisPool:
25+
name: onnxruntime-Win-CPU-2022
26+
os: windows
27+
pool:
28+
name: 'onnxruntime-Ubuntu2204-AMD-CPU'
29+
os: 'linux'
30+
stages:
31+
- template: stages/release-stage.yml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
steps:
2+
- task: UsePythonVersion@0
3+
inputs:
4+
versionSpec: '3.11'
5+
displayName: 'Set Up Python'
6+
- script: python -m pip install --upgrade pip build wheel
7+
displayName: 'Install Python build dependencies'
8+
- script: python -m build
9+
displayName: 'Build ONNX Script wheel'
10+
- task: CopyFiles@2
11+
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
12+
inputs:
13+
SourceFolder: 'dist'
14+
Contents: '*.*'
15+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
16+
- task: 1ES.PublishPipelineArtifact@1
17+
displayName: 'Publish Python Wheel'
18+
inputs:
19+
ArtifactName: 'onnxscript'
20+
targetPath: '$(Build.ArtifactStagingDirectory)'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
stages:
2+
- stage: Stage
3+
jobs:
4+
- job: Job
5+
steps:
6+
- template: jobs/steps/release-steps.yml
7+
# Test the wheels. This needs to happen after PublishBuildArtifacts
8+
# to avoid interference with the artifacts
9+
- script: python -m pip install dist/*.whl --no-deps
10+
displayName: 'Install wheel'
11+
condition: eq(variables['ONNX_SCRIPT_RELEASE'], 1)

0 commit comments

Comments
 (0)