From a1500486978e7554d905ef81af3a1bc04c7f9c71 Mon Sep 17 00:00:00 2001 From: Gary Verhaegen Date: Thu, 18 Apr 2019 17:46:02 +0100 Subject: [PATCH] run perf tests separately (#605) --- azure-pipelines.yml | 26 +++++++++++++++++++++++++- build.sh | 9 --------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ecf52a0d64f..deeda7dbca6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,8 +43,32 @@ jobs: steps: - template: ci/build-windows.yml + - job: perf + timeoutInMinutes: 30 + pool: + name: 'linux-pool' + steps: + - checkout: self + - bash: ci/dev-env-install.sh + displayName: 'Build/Install the Developer Environment' + - bash: ci/configure-bazel.sh + displayName: 'Configure Bazel' + env: + IS_FORK: $(System.PullRequest.IsFork) + # to upload to the bazel cache + GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT) + - bash: | + set -euo pipefail + eval "$(./dev-env/bin/dade-assist)" + bazel run -- //ledger/sandbox-perf -foe true -i1 -f1 -wi 1 -bm avgt -rf csv -rff "$(Build.StagingDirectory)/sandbox-perf.csv" + - task: PublishBuildArtifacts@1 + condition: succeededOrFailed() + inputs: + pathtoPublish: '$(Build.StagingDirectory)' + artifactName: 'Perf test logs' + - job: release - dependsOn: [ "Linux", "macOS", "Windows"] + dependsOn: [ "linux", "macos", "windows", "perf"] pool: vmImage: "Ubuntu-16.04" condition: and(succeeded(), diff --git a/build.sh b/build.sh index 3685a80f00a..791e3ac74a9 100755 --- a/build.sh +++ b/build.sh @@ -27,14 +27,5 @@ ARTIFACT_DIRS="${BUILD_ARTIFACTSTAGINGDIRECTORY:-$PWD}" bazel test -j 200 //... --experimental_execution_log_file "$ARTIFACT_DIRS/test_execution${execution_log_postfix}.log" # Make sure that Bazel query works. bazel query 'deps(//...)' > /dev/null -# Execute Sandbox performance tests if on master -# On Jenkins we never run them as BUILD_SOURCEBRANCHNAME isn’t set. -# moreover, pass -foe true to make the benchmark fail with a proper -# exit code if things go wrong, rather than pretend that everything is -# fine. -if [[ "${BUILD_SOURCEBRANCHNAME:-master}" = master ]]; then - bazel run -- //ledger/sandbox-perf -foe true -i1 -f1 -wi 1 -bm avgt -rf csv -rff "$ARTIFACT_DIRS/sandbox-perf.csv" # 1 warmup, 1 iterations in 1 fork -fi - # Check that we can load damlc in ghci da-ghci damlc -e '()'