Skip to content

Commit

Permalink
disable azure ops from ci/packaging pipelines (microsoft#746)
Browse files Browse the repository at this point in the history
* disable azure ops from ci/packaging pipelines

* add the missed files

* keep the env variable flag

* add python to the path?
  • Loading branch information
wenbingl authored Jun 14, 2024
1 parent 690bed7 commit 3c22daa
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ stages:
inputs:
versionSpec: '3.x'
disableDownloadFromRegistry: true
addToPath: false
addToPath: true
architecture: 'x64'

- script: |
Expand Down Expand Up @@ -507,7 +507,7 @@ stages:
inputs:
versionSpec: '3.x'
disableDownloadFromRegistry: true
addToPath: false
addToPath: true
architecture: 'x64'
displayName: Use ADO python task

Expand Down Expand Up @@ -583,7 +583,7 @@ stages:
inputs:
versionSpec: '3.x'
disableDownloadFromRegistry: true
addToPath: false
addToPath: true
architecture: 'x64'
displayName: Use ADO python task

Expand Down
4 changes: 2 additions & 2 deletions .pipelines/ci_optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ stages:
inputs:
versionSpec: '3.x'
disableDownloadFromRegistry: true
addToPath: false
addToPath: true
architecture: 'x64'
displayName: Use ADO python task

Expand Down Expand Up @@ -172,7 +172,7 @@ stages:
inputs:
versionSpec: '3.x'
disableDownloadFromRegistry: true
addToPath: false
addToPath: true
architecture: 'x64'
displayName: Use ADO python task

Expand Down
2 changes: 1 addition & 1 deletion .pipelines/wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parameters:
- name: ExtraEnv
displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"'
type: string
default: 'OCOS_ENABLE_AZURE=1'
default: 'OCOS_ENABLE_AZURE=0'

jobs:
- job: linux_x86_64
Expand Down
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ set(OCOS_ONNXRUNTIME_PKG_URI "" CACHE STRING
"Specify the onnxruntime C++ shared library zip package path, like ./onnxruntime-win-x64-1.16.0.zip")
set(OCOS_BUILD_PRESET "" CACHE STRING
"Specify the build preset cmake settings file path, like 'token_api_only' which includes ./cmake/presets/token_api_only.cmake")
# TODO: Remove the following statements if AzureOp build is enabled by default.
# If build_buildid environment varaible is set, which means this is a CI build, then always enable AzureOp.
# or it is enabled when OCOS_ENABLE_AZURE is set, which means the user explicitly enables it.
if ((DEFINED ENV{BUILD_BUILDID}) OR (DEFINED ENV{OCOS_ENABLE_AZURE}))

# AzureOp can be enabled by environment varaible OCOS_ENABLE_AZURE == 1
if (DEFINED ENV{OCOS_ENABLE_AZURE})
set(OCOS_ENABLE_AZURE ON CACHE INTERNAL "" FORCE)
message(STATUS "=> AzureOp is enabled by default.")
message(STATUS "=> AzureOp is enabled env variable.")
endif()

function(disable_all_operators)
Expand Down
2 changes: 1 addition & 1 deletion docs/custom_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ expect(node, inputs=[text, pattern, rewrite], outputs=[y],
## Azure operators
Starting from onnxruntime-extensions 0.12, these Azure operators will be removed from the official onnxruntime-extensions packages. However, they can still be built from source using `cmake -DOCOS_ENABLE_AZURE=ON ...`.
### OpenAIAudioToText
<details>
Expand Down
2 changes: 1 addition & 1 deletion tools/test_cibuildwheel.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if "%OCOS_ENABLE_AZURE%"=="1" (
pushd %1\test
python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly==1.16.0.dev20230820005
python -m pip install onnxruntime==1.18
python test_azure_ops.py
popd
)
2 changes: 1 addition & 1 deletion tools/test_cibuildwheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [[ "$OCOS_ENABLE_AZURE" == "1" ]]
then
pushd $1/test
python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly==1.16.0.dev20230820005
python -m pip install onnxruntime==1.18
python ./test_azure_ops.py
popd
fi

0 comments on commit 3c22daa

Please sign in to comment.