From: Alicia Li Date: Thu, 9 Sep 2021 16:34:21 +0000 (-0700) Subject: Port fixes for perf pipeline from main branch (#58843) X-Git-Tag: accepted/tizen/unified/20220110.054933~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0933d9a1d3c09fdae125831bd165f983825f77c9;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Port fixes for perf pipeline from main branch (#58843) * fix merge conflict * Fix ios build (#57776) * add deployandrun to ios * build with DEPLOY_AND_RUN=false for ios Co-authored-by: Bill Wert --- diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml index 65b6226..3d5d83b 100644 --- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml @@ -24,7 +24,7 @@ steps: workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/Android displayName: Build HelloAndroid sample app - ${{ if eq(parameters.osGroup, 'iOS') }}: - - script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False + - script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false env: DevTeamProvisioning: '-' workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS @@ -47,7 +47,7 @@ steps: - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS displayName: Clean bindir - - script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True + - script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false env: DevTeamProvisioning: '-' workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index de523bb..3e95e9c 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -55,9 +55,9 @@ jobs: - IsInternal: '' - HelixApiAccessToken: '' - - HelixPreCommandStemWindows: '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: '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/Scripts/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)"' - - HelixPreCommandStemMsul: 'sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib;sudo apk add cargo --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/community ;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)"' + - 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;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)"' + - HelixPreCommandStemMsul: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib;sudo apk add cargo --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/community ;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)"' - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"' - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"' - HelixPreCommand: '' @@ -66,13 +66,16 @@ jobs: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if eq( parameters.osGroup, 'windows') }}: - HelixPreCommand: $(HelixPreCommandStemWindows);$(ExtraMSBuildLogsWindows) + - HelixPostCommand: 'set PYTHONPATH=%ORIGPYPATH%' - IsInternal: -Internal - ${{ if ne(parameters.osGroup, 'windows') }}: - ${{ if eq(parameters.osSubGroup, '_musl') }}: - HelixPreCommand: $(HelixPreCommandStemMsul);$(ExtraMSBuildLogsLinux) + - HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH' - IsInternal: --internal - ${{ if ne(parameters.osSubGroup, '_musl') }}: - HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux) + - HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH' - IsInternal: --internal - group: DotNet-HelixApi-Access - group: dotnet-benchview @@ -132,6 +135,7 @@ jobs: HelixAccessToken: $(HelixApiAccessToken) HelixTargetQueues: $(Queue) HelixPreCommands: $(HelixPreCommand) + HelixPostCommands: $(HelixPostCommand) Creator: $(Creator) WorkItemTimeout: 4:00 # 4 hours WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index 2fa6822..551c5f9 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -63,13 +63,16 @@ jobs: # extra private job settings - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if eq(parameters.osGroup, 'windows') }}: - - AdditionalHelixPreCommands: '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 --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' + - AdditionalHelixPreCommands: 'set ORIGPYPATH=%PYTHONPATH%;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 --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' + - AdditionalHelixPostCommands: 'set PYTHONPATH=%ORIGPYPATH%' - IsInternal: -Internal - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osSubGroup, '_musl')) }}: - - AdditionalHelixPreCommands: 'sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/Scripts/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - AdditionalHelixPreCommands: 'export $ORIGPYPATH=$PYTHONPATH;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 --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - AdditionalHelixPostCommands: 'export $PYTHONPATH=$ORIGPYPATH' - IsInternal: --internal - ${{ if and(ne(parameters.osGroup, 'windows'), eq(parameters.osSubGroup, '_musl')) }}: - - AdditionalHelixPreCommands: 'sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/Scripts/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - AdditionalHelixPreCommands: 'export $ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - AdditionalHelixPostCommands: 'export $PYTHONPATH=$ORIGPYPATH' - IsInternal: --internal - group: DotNet-HelixApi-Access - group: dotnet-benchview @@ -145,6 +148,7 @@ jobs: HelixAccessToken: $(HelixApiAccessToken) HelixTargetQueues: $(Queue) HelixPreCommands: '$(AdditionalHelixPreCommands);$(SharedHelixPreCommands)' # $(HelixPreCommands) should follow $(AdditionalHelixPreCommands) because PYTHONPATH is cleared by the former + HelixPostCommands: $(AdditionalHelixPostCommands) Creator: $(Creator) WorkItemTimeout: 4:00 # 4 hours WorkItemDirectory: '$(WorkItemDirectory)' # contains scenario tools, shared python scripts, dotnet tool diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile index 34279c4..8148d6e 100644 --- a/src/mono/sample/iOS/Makefile +++ b/src/mono/sample/iOS/Makefile @@ -4,6 +4,7 @@ DOTNET := ../../../../dotnet.sh USE_LLVM=true AOT?=false TARGET?=iOSSimulator +DEPLOY_AND_RUN?=true #If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled. #If RUNTIME_COMPONENTS is enabled, DIAGNOSTIC_PORTS is optional. @@ -31,6 +32,7 @@ run: clean appbuilder /p:UseLLVM=$(USE_LLVM) \ /p:ForceAOT=$(AOT) \ '/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' run-sim: clean appbuilder @@ -41,10 +43,12 @@ run-sim: clean appbuilder /p:UseLLVM=$(USE_LLVM) \ /p:ForceAOT=$(AOT) \ '/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' build-appbundle: clean appbuilder $(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=$(TARGET) /p:TargetArchitecture=$(MONO_ARCH) \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ /p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) /bl \ run-catalyst: @@ -52,6 +56,7 @@ run-catalyst: -c $(MONO_CONFIG) \ /p:TargetOS=MacCatalyst \ /p:TargetArchitecture=$(MONO_ARCH) \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ /p:UseLLVM=False \ /p:ForceAOT=True @@ -63,6 +68,7 @@ run-sim-interp: clean appbuilder /p:UseLLVM=$(USE_LLVM) \ /p:ForceAOT=$(AOT) \ /p:MonoForceInterpreter=true \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ '/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' @@ -72,6 +78,7 @@ run-catalyst-interp: /p:TargetOS=MacCatalyst \ /p:TargetArchitecture=$(MONO_ARCH) \ /p:UseLLVM=False \ + '/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \ /p:ForceAOT=True \ /p:MonoForceInterpreter=true diff --git a/src/mono/sample/iOS/Program.csproj b/src/mono/sample/iOS/Program.csproj index 471abcb..8c3b217 100644 --- a/src/mono/sample/iOS/Program.csproj +++ b/src/mono/sample/iOS/Program.csproj @@ -5,6 +5,7 @@ $(NetCoreAppToolCurrent) iOS iOSSimulator + true $(TargetOS.ToLower())-$(TargetArchitecture) $(DefineConstants);CI_TEST @@ -91,7 +92,7 @@ + Condition="'$(ArchiveTests)' != 'true' and '$(DeployAndRun)' == 'true'">