diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 50279887..6a82714e 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -445,59 +445,54 @@ stages: strategy: matrix: + py312-1201: + python.version: '3.12' + torch.version: 'torch torchvision torchaudio' + ort.version: '1.20.1' py312-1192: python.version: '3.12' torch.version: 'torch torchvision torchaudio' ort.version: '1.19.2' - py312-1181: - python.version: '3.12' + py311-1181: + python.version: '3.11' torch.version: 'torch torchvision torchaudio' ort.version: '1.18.1' - py311-1171: - python.version: '3.11' + py310-1171: + python.version: '3.10' torch.version: 'torch torchvision torchaudio' ort.version: '1.17.1' py310-1163: python.version: '3.10' torch.version: 'torch torchvision torchaudio' ort.version: '1.16.3' - py39-1151: - python.version: '3.9' - torch.version: 'torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 --index-url https://download.pytorch.org/whl/cpu' - 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 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 activate pyenv set CMAKE_ARGS=-DOCOS_ONNXRUNTIME_VERSION=$(ort.version) - python -m pip install . + python -m pip install -v . displayName: Build the wheel - script: | - call activate pyenv python -m pip install $(torch.version) displayName: Install pytorch - condition: ne(variables['python.version'], '3.12') - script: | - call activate pyenv - pytest test + cd test && python -m pytest . displayName: Run python test - condition: ne(variables['python.version'], '3.12') ################# # Windows PyDebug @@ -509,7 +504,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.x' + versionSpec: '3.12' disableDownloadFromRegistry: true addToPath: true architecture: 'x64' @@ -518,10 +513,11 @@ stages: - script: | python -m pip install --upgrade setuptools pip python -m pip install "numpy < 2.0.0" - set OCOS_NO_OPENCV=1 - set OCOS_SCB_DEBUG=1 python -m pip install -v -e . displayName: Build onnxruntime-extensions in editable mode. + env: + OCOS_NO_OPENCV: 1 + OCOS_SCB_DEBUG: 1 - script: | python -m pip install -r requirements-dev.txt diff --git a/.pipelines/ci_optional.yml b/.pipelines/ci_optional.yml index 7d58dc73..2e8fb0ce 100644 --- a/.pipelines/ci_optional.yml +++ b/.pipelines/ci_optional.yml @@ -130,7 +130,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.x' + versionSpec: '3.12' disableDownloadFromRegistry: true addToPath: true architecture: 'x64'