diff --git a/pipeline.yaml b/pipeline.yaml index d2bdb3b022..a7ff8f3d9d 100644 --- a/pipeline.yaml +++ b/pipeline.yaml @@ -457,7 +457,7 @@ jobs: - template: templates/conda.yml - template: templates/kv.yml - task: AzureCLI@2 - displayName: 'Test R Code' + displayName: 'Prepare for tests' retryCountOnTaskFailure: 1 timeoutInMinutes: 60 inputs: @@ -469,16 +469,24 @@ jobs: export SBT_OPTS="-Xms2G -Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=4G -Xss5M -Duser.timezone=GMT" source activate synapseml (timeout 5m sbt setup) || (echo "retrying" && timeout 5m sbt setup) || (echo "retrying" && timeout 5m sbt setup) - # tests in opencv and deep-learning source R wrappers from core, so core wrappers must exist - if [[ $(PACKAGE) -eq "opencv" || $(PACKAGE) -eq "deepLearning" ]]; then - (sbt "project core" rCodegen) || (echo "retrying" && sbt "project core" rCodegen) || (echo "retrying" && sbt "project core" rCodegen) - fi + sbt codegen sbt publishM2 - SPARK_VERSION=3.4.1 HADOOP_VERSION=3 wget https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz - (timeout 20m sbt "project $(PACKAGE)" coverage testR) || (echo "retrying" && timeout 20m sbt "project $(PACKAGE)" coverage testR) || (echo "retrying" && timeout 20m sbt "project $(PACKAGE)" coverage testR) + - task: AzureCLI@2 + displayName: 'Test R Code' + retryCountOnTaskFailure: 3 + timeoutInMinutes: 20 + inputs: + azureSubscription: 'SynapseML Build' + scriptLocation: inlineScript + scriptType: bash + inlineScript: | + set -e + export SBT_OPTS="-Xms2G -Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=4G -Xss5M -Duser.timezone=GMT" + source activate synapseml + timeout 20m sbt -DskipCodegen=true "project $(PACKAGE)" coverage testR - task: PublishTestResults@2 displayName: 'Publish Test Results' inputs: @@ -701,6 +709,9 @@ jobs: scriptType: bash inlineScript: | (timeout 30s pip install requests) || (echo "retrying" && timeout 30s pip install requests) + (${FFMPEG:-false} && sudo apt-get update && \ + sudo apt-get install ffmpeg libgstreamer1.0-0 \ + gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly -y) (timeout 5m sbt setup) || (echo "retrying" && timeout 5m sbt setup) || (echo "retrying" && timeout 5m sbt setup) - task: AzureCLI@2 displayName: 'Unit Test' @@ -712,9 +723,6 @@ jobs: scriptType: bash inlineScript: | ulimit -c unlimited - (${FFMPEG:-false} && sudo apt-get update && \ - sudo apt-get install ffmpeg libgstreamer1.0-0 \ - gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly -y) export SBT_OPTS="-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2G -Xss2M -Duser.timezone=GMT" (timeout 30m sbt coverage "testOnly com.microsoft.azure.synapse.ml.$(PACKAGE).**") || (${FLAKY:-false} && timeout 30m sbt coverage "testOnly com.microsoft.azure.synapse.ml.$(PACKAGE).**")