Skip to content

Commit

Permalink
switch to Windows Python
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbingl authored Mar 7, 2025
1 parent 85c6f6e commit caf9186
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,38 +467,32 @@ stages:
ort.version: '1.15.1'

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH

- script: |
conda create --yes --quiet --name pyenv -c conda-forge python=$(python.version) numpy
displayName: Create Anaconda environment
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
disableDownloadFromRegistry: true
addToPath: true
architecture: 'x64'
displayName: Use ADO python task

- script: |
call conda activate pyenv
python -m pip install --upgrade pip
python -m pip install onnxruntime==$(ort.version)
python -m pip install -r requirements-dev.txt
displayName: Install requirements{-dev}.txt and cmake python modules
condition: ne(variables['python.version'], '3.12')
- script: |
call conda activate pyenv
set CMAKE_ARGS=-DOCOS_ONNXRUNTIME_VERSION=$(ort.version)
python -m pip install .
displayName: Build the wheel
- script: |
call conda activate pyenv
python -m pip install $(torch.version)
displayName: Install pytorch
condition: ne(variables['python.version'], '3.12')
- script: |
call conda activate pyenv
python -m pytest test
displayName: Run python test
condition: ne(variables['python.version'], '3.12')
#################
# Windows PyDebug
Expand All @@ -510,7 +504,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
versionSpec: '3.12'
disableDownloadFromRegistry: true
addToPath: true
architecture: 'x64'
Expand Down

0 comments on commit caf9186

Please sign in to comment.