Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nonzero Exit Code for performance-setup Failures #59483

Merged
merged 6 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions eng/testing/performance/performance-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,25 +122,45 @@ if ($RunFromPerformanceRepo) {
$SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"

robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git
if ($LASTEXITCODE -ne 0) {
Write-Output "Failed to copy $SourceDirectory: exit code $LASTEXITCODE"
exit 1
}
}
Tohron marked this conversation as resolved.
Show resolved Hide resolved
else {
Tohron marked this conversation as resolved.
Show resolved Hide resolved
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory
if ($LASTEXITCODE -ne 0) {
Write-Output "git clone failed with code $LASTEXITCODE"
exit 1
}
}

if($MonoDotnet -ne "")
{
$UsingMono = "true"
$MonoDotnetPath = (Join-Path $PayloadDirectory "dotnet-mono")
Move-Item -Path $MonoDotnet -Destination $MonoDotnetPath
if (!$?) {
Write-Output "Failed to move $MonoDotnet"
exit 1
}
}

if ($UseCoreRun) {
$NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root")
Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot
if (!$?) {
Write-Output "Failed to move $CoreRootDirectory"
exit 1
}
}
if ($UseBaselineCoreRun) {
$NewBaselineCoreRoot = (Join-Path $PayloadDirectory "Baseline_Core_Root")
Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot
if (!$?) {
Write-Output "Failed to move $BaselineCoreRootDirectory"
exit 1
}
}

if ($AndroidMono) {
Expand All @@ -149,6 +169,10 @@ if ($AndroidMono) {
mkdir $WorkItemDirectory
}
Copy-Item -path "$SourceDirectory\artifacts\bin\AndroidSampleApp\arm64\Release\android-arm64\publish\apk\bin\HelloAndroid.apk" $PayloadDirectory
if (!$?) {
Write-Output "Failed to copy $SourceDirectory\artifacts\bin\AndroidSampleApp\arm64\Release\android-arm64\publish\apk\bin\HelloAndroid.apk"
exit 1
}
$SetupArguments = $SetupArguments -replace $Architecture, 'arm64'
}

Expand All @@ -159,15 +183,27 @@ if ($iOSMono) {
}
if($iOSLlvmBuild) {
Copy-Item -path "$SourceDirectory\iosHelloWorld\llvm" $PayloadDirectory\iosHelloWorld\llvm -Recurse
if (!$?) {
Write-Output "Failed to copy $SourceDirectory\iosHelloWorld\llvm"
exit 1
}
} else {
Copy-Item -path "$SourceDirectory\iosHelloWorld\nollvm" $PayloadDirectory\iosHelloWorld\nollvm -Recurse
if (!$?) {
Write-Output "Failed to copy $SourceDirectory\iosHelloWorld\nollvm"
exit 1
}
}

$SetupArguments = $SetupArguments -replace $Architecture, 'arm64'
}

$DocsDir = (Join-Path $PerformanceDirectory "docs")
robocopy $DocsDir $WorkItemDirectory
if (!$LASTEXITCODE -ne 0) {
Write-Output "Failed to copy $DocsDir: exit code $LASTEXITCODE"
exit 1
}

# Set variables that we will need to have in future steps
$ci = $true
Expand Down
31 changes: 29 additions & 2 deletions eng/testing/performance/performance-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,39 @@ else
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $performance_directory
# uncomment to use BenchmarkDotNet sources instead of nuget packages
# git clone https://github.com/dotnet/BenchmarkDotNet.git $benchmark_directory
if [ "$?" -ne "0" ]; then
echo "git clone failed with code $?"
exit 1
Tohron marked this conversation as resolved.
Show resolved Hide resolved

docs_directory=$performance_directory/docs
mv $docs_directory $workitem_directory
if [ "$?" -ne "0" ]; then
echo "Failed to move $docs_directory"
exit 1
fi

if [[ "$wasm_runtime_loc" != "" ]]; then
using_wasm=true
wasm_dotnet_path=$payload_directory/dotnet-wasm
mv $wasm_runtime_loc $wasm_dotnet_path
if [ "$?" -ne "0" ]; then
echo "Failed to move $wasm_runtime_loc"
exit 1
# install emsdk, $source_directory/src/mono/wasm/ has the nuget.config with require feed. EMSDK may be available in the payload in a different directory, should visit this install to avoid deplicated payload.
pushd $source_directory/src/mono/wasm/
make provision-wasm
EMSDK_PATH = $source_directory/src/mono/wasm/emsdk
popd
# wasm aot and interpreter need some source code from dotnet\runtime repo
rsync -aq --progress $source_directory/* $wasm_dotnet_path --exclude Payload --exclude docs --exclude src/coreclr --exclude src/tests --exclude artifacts/obj --exclude artifacts/log --exclude artifacts/tests --exclude __download__
if [ "$?" -ne "0" ]; then
echo "Failed to sync $source_directory/*"
exit 1
# copy wasm build drop to the location that aot and interpreter build expects
rsync -a --progress $wasm_dotnet_path/artifacts/BrowserWasm/artifacts/* $wasm_dotnet_path/artifacts
if [ "$?" -ne "0" ]; then
echo "Failed to sync $wasm_dotnet_path/artifacts/BrowserWasm/artifacts/*"
exit 1
rm -r $wasm_dotnet_path/artifacts/BrowserWasm/artifacts
if [[ "$wasmaot" == "true" ]]; then
extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine --runtimeSrcDir \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm --aotcompilermode wasm --buildTimeout 3600"
Expand All @@ -297,22 +312,34 @@ if [[ "$mono_dotnet" != "" ]] && [[ "$monoaot" == "false" ]]; then
using_mono=true
mono_dotnet_path=$payload_directory/dotnet-mono
mv $mono_dotnet $mono_dotnet_path
if [ "$?" -ne "0" ]; then
echo "Failed to move $mono_dotnet"
exit 1
fi

if [[ "$monoaot" == "true" ]]; then
monoaot_dotnet_path=$payload_directory/monoaot
mv $monoaot_path $monoaot_dotnet_path
if [ "$?" -ne "0" ]; then
echo "Failed to move $monoaot_path"
exit 1
extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --runtimes monoaotllvm --aotcompilerpath \$HELIX_CORRELATION_PAYLOAD/monoaot/sgen/mini/mono-sgen --customruntimepack \$HELIX_CORRELATION_PAYLOAD/monoaot/pack --aotcompilermode llvm"
fi

if [[ "$use_core_run" = true ]]; then
new_core_root=$payload_directory/Core_Root
mv $core_root_directory $new_core_root
if [ "$?" -ne "0" ]; then
echo "Failed to move $core_root_directory"
exit 1
fi

if [[ "$use_baseline_core_run" = true ]]; then
new_baseline_core_root=$payload_directory/Baseline_Core_Root
mv $baseline_core_root_directory $new_baseline_core_root
new_baseline_core_root=$payload_directory/Baseline_Core_Root
mv $baseline_core_root_directory $new_baseline_core_root
if [ "$?" -ne "0" ]; then
echo "Failed to move $baseline_core_root_directory"
exit 1
fi

ci=true
Expand Down