diff options
author | Ankit Jain <radical@gmail.com> | 2022-08-06 02:40:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 02:40:09 +0300 |
commit | fe957c07d64168344e245f3d1a6b4644f6e54957 (patch) | |
tree | 87ce18265bc7a33bb3ea9679d61731be565209ca /eng | |
parent | a231aa7f43adf7201d00e2c4e7211a314b475303 (diff) |
[wasm] Ensure prerequisites are installed on the perf pipeline (#72431)
- this updates node/npm to 18.x
- And passes `--not-in-lab` for PRs builds, so it doesn't try to setup
access tokens.
Diffstat (limited to 'eng')
5 files changed, 49 insertions, 8 deletions
diff --git a/eng/pipelines/coreclr/templates/perf-send-to-helix.yml b/eng/pipelines/coreclr/templates/perf-send-to-helix.yml index 44290b3f7d6..c11b0ffe8b7 100644 --- a/eng/pipelines/coreclr/templates/perf-send-to-helix.yml +++ b/eng/pipelines/coreclr/templates/perf-send-to-helix.yml @@ -21,7 +21,7 @@ parameters: condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false osGroup: '' # required -- operating system for the job - + HelixPrereqCommands: '' steps: - template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml @@ -40,6 +40,7 @@ steps: HelixAccessToken: ${{ parameters.HelixAccessToken }} HelixPreCommands: ${{ parameters.HelixPreCommands }} HelixPostCommands: ${{ parameters.HelixPostCommands }} + HelixPrereqCommands: ${{ parameters.HelixPrereqCommands }} WorkItemDirectory: ${{ parameters.WorkItemDirectory }} WorkItemTimeout: ${{ parameters.WorkItemTimeout }} CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index 6836e19f0af..d4e25aff3f4 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -58,9 +58,35 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' - - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' - - HelixPreCommandStemLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m pip install -U pip;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install azure.storage.blob==12.0.0;pip3 install azure.storage.queue==12.0.0;sudo apt-get update;sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates;curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -;sudo apt-get -y install nodejs;sudo apt-get -y install npm;npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g;$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8,javascriptcore;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' - - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - ${{ if and(eq(parameters.runtimeType, 'wasm'), in(variables['Build.Reason'], 'PullRequest')) }}: + - HelixPerfUploadTokenValue: '' + - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.osGroup, 'windows')) }}: + - HelixPerfUploadTokenValue: '$(PerfCommandUploadTokenLinux)' + - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.osGroup, 'windows')) }}: + - HelixPerfUploadTokenValue: '$(PerfCommandUploadToken)' + - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"' + - HelixPreCommandStemLinux: >- + export ORIGPYPATH=$PYTHONPATH + export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true; + echo "** Installing prerequistes **"; + python3 -m pip install -U pip && + sudo apt-get -y install python3-venv && + python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv && + ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate && + export PYTHONPATH= && + python3 -m pip install -U pip && + pip3 install azure.storage.blob==12.0.0 && + pip3 install azure.storage.queue==12.0.0 && + sudo apt-get update && + sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates && + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && + sudo apt-get -y install nodejs && + npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g && + $HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8,javascriptcore && + export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)" && + export PERF_PREREQS_INSTALLED=1; + test "x$PERF_PREREQS_INSTALLED" = "x1" || echo "** Error: Failed to install prerequites **" + - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"' - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"' - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"' - HelixPreCommand: '' @@ -89,7 +115,7 @@ jobs: - HelixPreCommand: $(HelixPreCommandStemWindows);$(ExtraMSBuildLogsWindows) - HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH;${{ parameters.collectHelixLogsScript }}' - ${{ if ne(parameters.osGroup, 'windows') }}: - - HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux);npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g;$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8,javascriptcore + - HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux); - HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH;${{ parameters.collectHelixLogsScript }}' - ${{ if and(eq(parameters.codeGenType, 'Interpreter'), eq(parameters.runtimeType, 'mono')) }}: diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index 47426ab059b..f22aa119d0d 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -110,7 +110,7 @@ jobs: - ${{ if ne(parameters.runtimeType, 'wasm') }}: - ExtraSetupArguments: --install-dir $(PayloadDirectory)/dotnet - ${{ if and(eq(parameters.runtimeType, 'wasm'), in(variables['Build.Reason'], 'PullRequest')) }}: - - ExtraSetupArguments: --not-in-lab + - ExtraSetupArguments: '' workspace: clean: all diff --git a/eng/testing/performance/microbenchmarks.proj b/eng/testing/performance/microbenchmarks.proj index dbd72766827..2f012348302 100644 --- a/eng/testing/performance/microbenchmarks.proj +++ b/eng/testing/performance/microbenchmarks.proj @@ -131,7 +131,12 @@ <HelixWorkItem Include="@(Partition)"> <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory> <PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands> - <Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command> + <Command> + if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then + $(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"; + else + echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1; + fi</Command> <PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands> <Timeout>$(WorkItemTimeout)</Timeout> </HelixWorkItem> @@ -141,7 +146,12 @@ <HelixWorkItem Include="$(BuildConfig).WorkItem"> <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory> <PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands> - <Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command> + <Command> + if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then + $(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"; + else + echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1; + fi</Command> <PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands> <Timeout>4:00</Timeout> </HelixWorkItem> diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index 2303f60c084..f830a0ac641 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -310,6 +310,10 @@ fi common_setup_arguments="--channel $cleaned_branch_name --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture" setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments" +if [[ "$internal" != true ]]; then + setup_arguments="$setup_arguments --not-in-lab" +fi + if [[ "$run_from_perf_repo" == true ]]; then payload_directory= workitem_directory=$source_directory |