Skip to content

Commit 0933d9a

Browse files
Lxiamailbillwert
andauthored
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 <billwert@microsoft.com>
1 parent 06b23ba commit 0933d9a

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

eng/pipelines/coreclr/templates/build-perf-sample-apps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/Android
2525
displayName: Build HelloAndroid sample app
2626
- ${{ if eq(parameters.osGroup, 'iOS') }}:
27-
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False
27+
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
2828
env:
2929
DevTeamProvisioning: '-'
3030
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
@@ -47,7 +47,7 @@ steps:
4747
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
4848
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
4949
displayName: Clean bindir
50-
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True
50+
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
5151
env:
5252
DevTeamProvisioning: '-'
5353
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS

eng/pipelines/coreclr/templates/run-performance-job.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ jobs:
5555

5656
- IsInternal: ''
5757
- HelixApiAccessToken: ''
58-
- 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)"'
59-
- 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)"'
60-
- 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)"'
58+
- 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)"'
59+
- 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)"'
60+
- 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)"'
6161
- ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
6262
- ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
6363
- HelixPreCommand: ''
@@ -66,13 +66,16 @@ jobs:
6666
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
6767
- ${{ if eq( parameters.osGroup, 'windows') }}:
6868
- HelixPreCommand: $(HelixPreCommandStemWindows);$(ExtraMSBuildLogsWindows)
69+
- HelixPostCommand: 'set PYTHONPATH=%ORIGPYPATH%'
6970
- IsInternal: -Internal
7071
- ${{ if ne(parameters.osGroup, 'windows') }}:
7172
- ${{ if eq(parameters.osSubGroup, '_musl') }}:
7273
- HelixPreCommand: $(HelixPreCommandStemMsul);$(ExtraMSBuildLogsLinux)
74+
- HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH'
7375
- IsInternal: --internal
7476
- ${{ if ne(parameters.osSubGroup, '_musl') }}:
7577
- HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux)
78+
- HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH'
7679
- IsInternal: --internal
7780
- group: DotNet-HelixApi-Access
7881
- group: dotnet-benchview
@@ -132,6 +135,7 @@ jobs:
132135
HelixAccessToken: $(HelixApiAccessToken)
133136
HelixTargetQueues: $(Queue)
134137
HelixPreCommands: $(HelixPreCommand)
138+
HelixPostCommands: $(HelixPostCommand)
135139
Creator: $(Creator)
136140
WorkItemTimeout: 4:00 # 4 hours
137141
WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy

eng/pipelines/coreclr/templates/run-scenarios-job.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,16 @@ jobs:
6363
# extra private job settings
6464
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
6565
- ${{ if eq(parameters.osGroup, 'windows') }}:
66-
- 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)"'
66+
- 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)"'
67+
- AdditionalHelixPostCommands: 'set PYTHONPATH=%ORIGPYPATH%'
6768
- IsInternal: -Internal
6869
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osSubGroup, '_musl')) }}:
69-
- 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)"'
70+
- 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)"'
71+
- AdditionalHelixPostCommands: 'export $PYTHONPATH=$ORIGPYPATH'
7072
- IsInternal: --internal
7173
- ${{ if and(ne(parameters.osGroup, 'windows'), eq(parameters.osSubGroup, '_musl')) }}:
72-
- 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)"'
74+
- 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)"'
75+
- AdditionalHelixPostCommands: 'export $PYTHONPATH=$ORIGPYPATH'
7376
- IsInternal: --internal
7477
- group: DotNet-HelixApi-Access
7578
- group: dotnet-benchview
@@ -145,6 +148,7 @@ jobs:
145148
HelixAccessToken: $(HelixApiAccessToken)
146149
HelixTargetQueues: $(Queue)
147150
HelixPreCommands: '$(AdditionalHelixPreCommands);$(SharedHelixPreCommands)' # $(HelixPreCommands) should follow $(AdditionalHelixPreCommands) because PYTHONPATH is cleared by the former
151+
HelixPostCommands: $(AdditionalHelixPostCommands)
148152
Creator: $(Creator)
149153
WorkItemTimeout: 4:00 # 4 hours
150154
WorkItemDirectory: '$(WorkItemDirectory)' # contains scenario tools, shared python scripts, dotnet tool

src/mono/sample/iOS/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ DOTNET := ../../../../dotnet.sh
44
USE_LLVM=true
55
AOT?=false
66
TARGET?=iOSSimulator
7+
DEPLOY_AND_RUN?=true
78

89
#If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled.
910
#If RUNTIME_COMPONENTS is enabled, DIAGNOSTIC_PORTS is optional.
@@ -31,6 +32,7 @@ run: clean appbuilder
3132
/p:UseLLVM=$(USE_LLVM) \
3233
/p:ForceAOT=$(AOT) \
3334
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
35+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
3436
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'
3537

3638
run-sim: clean appbuilder
@@ -41,17 +43,20 @@ run-sim: clean appbuilder
4143
/p:UseLLVM=$(USE_LLVM) \
4244
/p:ForceAOT=$(AOT) \
4345
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
46+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
4447
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'
4548

4649
build-appbundle: clean appbuilder
4750
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=$(TARGET) /p:TargetArchitecture=$(MONO_ARCH) \
51+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
4852
/p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) /bl \
4953

5054
run-catalyst:
5155
$(DOTNET) publish \
5256
-c $(MONO_CONFIG) \
5357
/p:TargetOS=MacCatalyst \
5458
/p:TargetArchitecture=$(MONO_ARCH) \
59+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
5560
/p:UseLLVM=False \
5661
/p:ForceAOT=True
5762

@@ -63,6 +68,7 @@ run-sim-interp: clean appbuilder
6368
/p:UseLLVM=$(USE_LLVM) \
6469
/p:ForceAOT=$(AOT) \
6570
/p:MonoForceInterpreter=true \
71+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
6672
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
6773
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'
6874

@@ -72,6 +78,7 @@ run-catalyst-interp:
7278
/p:TargetOS=MacCatalyst \
7379
/p:TargetArchitecture=$(MONO_ARCH) \
7480
/p:UseLLVM=False \
81+
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
7582
/p:ForceAOT=True \
7683
/p:MonoForceInterpreter=true
7784

src/mono/sample/iOS/Program.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
66
<TargetOS Condition="'$(TargetOS)' == ''">iOS</TargetOS>
77
<TargetOS Condition="'$(TargetsiOSSimulator)' == 'true'">iOSSimulator</TargetOS>
8+
<DeployAndRun Condition="'$(DeployAndRun)' == ''">true</DeployAndRun>
89
<RuntimeIdentifier>$(TargetOS.ToLower())-$(TargetArchitecture)</RuntimeIdentifier>
910
<DefineConstants Condition="'$(ArchiveTests)' == 'true'">$(DefineConstants);CI_TEST</DefineConstants>
1011
</PropertyGroup>
@@ -91,7 +92,7 @@
9192

9293
<Target Name="RunAppBundle"
9394
AfterTargets="BuildAppBundle"
94-
Condition="'$(ArchiveTests)' != 'true'">
95+
Condition="'$(ArchiveTests)' != 'true' and '$(DeployAndRun)' == 'true'">
9596
<!-- FIXME: only run if the TargetArchitecture matches the current architecture -->
9697

9798
<!-- install and run on ios simulator or device -->

0 commit comments

Comments
 (0)