Update scripts to access pipeline variables correctly (#1499)

* Update scripts to access IsReleaseBuild pipeline variable correctly

* Correct access of PACKAGENAME pipeline variable

* Fix Linux CUDA 10 package tests

* Enable C# GPU test

* Update
This commit is contained in:
Hariharan Seshadri 2019-07-25 15:30:32 -07:00 committed by GitHub
parent e0829b2b13
commit 6df4bc2ebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 12 deletions

View file

@ -9,7 +9,9 @@ set -x
SOURCE_ROOT=$1
BUILD_DIR=$2
NUGET_REPO_DIRNAME=$3 # path relative to BUILD_DIR
PackageName=${PackageName:-Microsoft.ML.OnnxRuntime}
PackageName=${PACKAGENAME:-Microsoft.ML.OnnxRuntime.Gpu}
RunTestCsharp=${RunTestCsharp:-true}
RunTestNative=${RunTestNative:-true}
#CUDA_VER=cuda10.0-cudnn7.3, cuda9.1-cudnn7.1, cuda10.0-cudnn7.3
CUDA_VER=${4:-cuda10.0-cudnn7.3}
@ -21,7 +23,7 @@ cd $SOURCE_ROOT/tools/ci_build/github/linux/docker
DOCKER_FILE=Dockerfile.ubuntu_gpu_cuda9
if [ $CUDA_VER = "cuda10.0-cudnn7.3" ]; then
DOCKER_FILE=Dockerfile.ubuntu_gpu_cuda
DOCKER_FILE=Dockerfile.ubuntu_gpu
fi
docker build -t "onnxruntime-$IMAGE" --build-arg OS_VERSION=16.04 --build-arg PYTHON_VERSION=${PYTHON_VER} -f $DOCKER_FILE .
@ -37,10 +39,12 @@ docker run -h $HOSTNAME \
--volume "$BUILD_DIR:/home/onnxruntimedev" \
--volume "$HOME/.cache/onnxruntime:/home/onnxruntimedev/.cache/onnxruntime" \
-e "OnnxRuntimeBuildDirectory=/home/onnxruntimedev" \
-e "IsReleaseBuild=$IsReleaseBuild" \
-e "IsReleaseBuild=$ISRELEASEBUILD" \
-e "PackageName=$PackageName" \
-e "RunTestCsharp=$RunTestCsharp" \
-e "RunTestNative=$RunTestNative" \
"onnxruntime-$IMAGE" \
/bin/bash /onnxruntime_src/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest-gpu.sh \
/bin/bash /onnxruntime_src/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \
/home/onnxruntimedev/$NUGET_REPO_DIRNAME /onnxruntime_src /home/onnxruntimedev &
wait -n

View file

@ -10,7 +10,7 @@ SOURCE_ROOT=$1
BUILD_DIR=$2
NUGET_REPO_DIRNAME=$3 # path relative to BUILD_DIR
Arch=${4:-x64} # x32, x64
PackageName=${PackageName:-Microsoft.ML.OnnxRuntime}
PackageName=${PACKAGENAME:-Microsoft.ML.OnnxRuntime}
RunTestCsharp=${RunTestCsharp:-true}
RunTestNative=${RunTestNative:-true}
PYTHON_VER=3.5
@ -36,7 +36,7 @@ docker run -h $HOSTNAME \
--volume "$BUILD_DIR:/home/onnxruntimedev" \
--volume "$HOME/.cache/onnxruntime:/home/onnxruntimedev/.cache/onnxruntime" \
-e "OnnxRuntimeBuildDirectory=/home/onnxruntimedev" \
-e "IsReleaseBuild=$IsReleaseBuild" \
-e "IsReleaseBuild=$ISRELEASEBUILD" \
-e "PackageName=$PackageName" \
-e "DisableContribOps=$DISABLECONTRIBOPS" \
-e "RunTestCsharp=$RunTestCsharp" \

View file

@ -107,3 +107,4 @@ jobs:
- template: test_linux.yml
parameters:
AgentPool : $(AgentPoolLinux)
TestGPU : 'true'

View file

@ -1,5 +1,6 @@
parameters:
AgentPool: 'Linux-CPU'
TestGPU: 'false'
jobs:
- job: NuGet_Test_Linux
@ -18,12 +19,21 @@ jobs:
artifactName: 'drop-signed-nuget'
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
- script: |
set -e -x
$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest-docker.sh $(Build.SourcesDirectory) $(Build.BinariesDirectory) nuget-artifact
displayName: 'Run Package Test (x64)'
env:
OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory)
- ${{ if eq(parameters['TestGPU'], 'false') }}:
- script: |
set -e -x
$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest-docker.sh $(Build.SourcesDirectory) $(Build.BinariesDirectory) nuget-artifact
displayName: 'Run Package Test (x64)'
env:
OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory)
- ${{ if eq(parameters['TestGPU'], 'true') }}:
- script: |
set -e -x
$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest-docker-gpu.sh $(Build.SourcesDirectory) $(Build.BinariesDirectory) nuget-artifact
displayName: 'Run Package Test GPU (x64)'
env:
OnnxRuntimeBuildDirectory: $(Build.BinariesDirectory)
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'