mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-25 22:26:24 +00:00
Follow-ups that need to happen after this and before the next ORT release: * Support SequenceMap with https://github.com/microsoft/onnxruntime/pull/11731 * Support signal ops with https://github.com/microsoft/onnxruntime/pull/11778 Follow-ups that need to happen after this but don't necessarily need to happen before the release: * Implement LayerNormalization kernel for opset version 17: https://github.com/microsoft/onnxruntime/issues/11916 Fixes #11640
145 lines
5.5 KiB
YAML
145 lines
5.5 KiB
YAML
jobs:
|
|
- job: Linux_Build
|
|
timeoutInMinutes: 120
|
|
workspace:
|
|
clean: all
|
|
pool: Linux-CPU-2019
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: recursive
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '12.16.3'
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.8'
|
|
addToPath: true
|
|
|
|
- template: templates/get-docker-image-steps.yml
|
|
parameters:
|
|
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cpu
|
|
Context: tools/ci_build/github/linux/docker
|
|
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )"
|
|
Repository: onnxruntimecpubuild
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'build'
|
|
inputs:
|
|
script: |
|
|
mkdir -p $HOME/.onnx
|
|
docker run --rm \
|
|
--volume /data/onnx:/data/onnx:ro \
|
|
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
|
--volume $(Build.BinariesDirectory):/build \
|
|
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \
|
|
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
|
|
-e NIGHTLY_BUILD \
|
|
-e BUILD_BUILDNUMBER \
|
|
onnxruntimecpubuild \
|
|
/opt/python/cp38-cp38/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
|
|
--build_dir /build --cmake_generator Ninja \
|
|
--config Debug Release \
|
|
--skip_submodule_sync \
|
|
--build_shared_lib \
|
|
--parallel \
|
|
--build_wheel \
|
|
--enable_onnx_tests \
|
|
--enable_transformers_tool_test \
|
|
--build_java --build_nodejs --update --build --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Install python deps and run java tests'
|
|
inputs:
|
|
script: |
|
|
set -e -x
|
|
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml onnx -qq
|
|
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
|
|
# Test ORT with the latest ONNX release.
|
|
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
|
|
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
|
|
mkdir $(Build.BinariesDirectory)/requirements_torch_cpu/
|
|
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/training/ortmodule/stage1/requirements_torch_cpu/requirements.txt $(Build.BinariesDirectory)/requirements_torch_cpu/requirements.txt
|
|
python3 -m pip install -r $(Build.BinariesDirectory)/requirements_torch_cpu/requirements.txt
|
|
ln -sf /data/models $(Build.BinariesDirectory)
|
|
cd $(Build.SourcesDirectory)/java
|
|
/usr/local/gradle/bin/gradle "cmakeCheck" "-DcmakeBuildDir=$(Build.BinariesDirectory)/Release"
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Install Release python package'
|
|
inputs:
|
|
script: |
|
|
rm -rf $(Build.BinariesDirectory)/Release/onnxruntime $(Build.BinariesDirectory)/Release/pybind11
|
|
python3 -m pip install $(Build.BinariesDirectory)/Release/dist/*.whl
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Run Release unit tests'
|
|
inputs:
|
|
scriptPath: $(Build.SourcesDirectory)/tools/ci_build/build.py
|
|
workingDirectory: $(Build.BinariesDirectory)/Release
|
|
arguments: >-
|
|
--build_dir $(Build.BinariesDirectory)
|
|
--cmake_generator Ninja
|
|
--config Release
|
|
--test
|
|
--skip_submodule_sync
|
|
--build_shared_lib
|
|
--parallel
|
|
--build_wheel
|
|
--enable_onnx_tests
|
|
--enable_transformers_tool_test
|
|
--build_nodejs
|
|
--ctest_path ""
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Install Debug python package'
|
|
inputs:
|
|
script: |
|
|
set -e -x
|
|
rm -rf $(Build.BinariesDirectory)/Debug/onnxruntime $(Build.BinariesDirectory)/Debug/pybind11
|
|
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml -qq
|
|
python3 -m pip install $(Build.BinariesDirectory)/Debug/dist/*.whl
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Run Debug unit tests'
|
|
inputs:
|
|
scriptPath: $(Build.SourcesDirectory)/tools/ci_build/build.py
|
|
workingDirectory: $(Build.BinariesDirectory)/Debug
|
|
arguments: >-
|
|
--build_dir $(Build.BinariesDirectory)
|
|
--cmake_generator Ninja
|
|
--config Debug
|
|
--test
|
|
--skip_submodule_sync
|
|
--build_shared_lib
|
|
--parallel
|
|
--build_wheel
|
|
--enable_onnx_tests
|
|
--enable_transformers_tool_test
|
|
--build_nodejs
|
|
--ctest_path ""
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Symbolic shape infer'
|
|
inputs:
|
|
scriptPath: $(Build.BinariesDirectory)/Release/onnxruntime_test_python_symbolic_shape_infer.py
|
|
workingDirectory: $(Build.BinariesDirectory)/Release
|
|
|
|
- task: PublishTestResults@2
|
|
displayName: 'Publish unit test results'
|
|
inputs:
|
|
testResultsFiles: '**/*.results.xml'
|
|
searchFolder: '$(Build.BinariesDirectory)'
|
|
testRunTitle: 'Unit Test Run'
|
|
condition: succeededOrFailed()
|
|
|
|
- template: templates/component-governance-component-detection-steps.yml
|
|
parameters:
|
|
condition: 'succeeded'
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|