Skip to content

Commit

Permalink
Replicate changes from #67670
Browse files Browse the repository at this point in the history
  • Loading branch information
TanayParikh committed Apr 28, 2022
1 parent d07b1ee commit d3149d4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 27 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ steps:
# NuGet.config file cannot be in the build directory currently due to https://github.com/dotnet/aspnetcore/issues/41397
rm NuGet.config
../dotnet publish -bl:MauiBlazoriOS.binlog -f net6.0-ios --self-contained -r ios-arm64 -c Release /p:_RequireCodeSigning=false
../dotnet publish -bl:MauiBlazoriOS.binlog -f net6.0-ios --self-contained -r ios-arm64 -c Release /p:_RequireCodeSigning=false /p:ApplicationId=net.dot.mauiblazortesting
mv ./bin/Release/net6.0-ios/ios-arm64/publish/MauiBlazorTesting.ipa ./MauiBlazoriOSDefault.ipa
# Restore NuGet.config
Expand Down
76 changes: 50 additions & 26 deletions eng/testing/performance/ios_scenarios.proj
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
<LlvmPath>nollvm</LlvmPath>
<LlvmPath Condition="'$(iOSLlvmBuild)' == 'True'">llvm</LlvmPath>
</PropertyGroup>

<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>

</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<ScenarioDirectory>$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/</ScenarioDirectory>
</PropertyGroup>

<ItemGroup>
<HelixWorkItem Include="SOD - iOS HelloWorld .app Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath) ./app;$(Python) pre.py --name app</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath) ./app;$(Python) pre.py --name app</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui MacCatalyst .app Size" Condition="'$(iOSLlvmBuild)' == 'False'">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
Expand All @@ -54,19 +54,19 @@
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Blazor iOS IPA Size" Condition="'$(iOSLlvmBuild)' == 'False'">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazoriOSDefaultIPA\MauiBlazoriOSDefault.ipa .;$(Python) pre.py --name MauiBlazoriOSDefault.ipa</PreCommands>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;cp $HELIX_CORRELATION_PAYLOAD/MauiBlazoriOSDefault.ipa .;$(Python) pre.py --name MauiBlazoriOSDefault.ipa</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Blazor iOS IPA Size Unzipped" Condition="'$(iOSLlvmBuild)' == 'False'">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazoriOSDefaultIPA\MauiBlazoriOSDefault.ipa .;$(Python) pre.py --unzip --name MauiBlazoriOSDefault.ipa</PreCommands>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;cp $HELIX_CORRELATION_PAYLOAD/MauiBlazoriOSDefault.ipa .;$(Python) pre.py --unzip --name MauiBlazoriOSDefault.ipa</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Blazor MacCatalyst .app Size" Condition="'$(iOSLlvmBuild)' == 'False'">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;xcopy %HELIX_CORRELATION_PAYLOAD%\MauiBlazorMacCatalystDefault .\app/e/i;$(Python) pre.py --name app</PreCommands>
<PreCommands>cd $(ScenarioDirectory)mauiblazorios;cp -rf $HELIX_CORRELATION_PAYLOAD/MauiBlazorMacCatalystDefault ./app;$(Python) pre.py --name app</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
Expand All @@ -82,12 +82,12 @@
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<XHarnessAppBundleToTest Include="Device Startup - iOS Maui Default" Condition="'$(iOSLlvmBuild)' == 'False'">
<AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
<WorkItemTimeout>00:05:00</WorkItemTimeout>
<TestTarget>ios-device</TestTarget>
<CustomCommands>
<![CDATA[
<XHarnessAppBundleToTest Include="Device Startup - iOS Maui Default" Condition="'$(iOSLlvmBuild)' == 'False'">
<AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
<WorkItemTimeout>00:05:00</WorkItemTimeout>
<TestTarget>ios-device</TestTarget>
<CustomCommands>
<![CDATA[
# PreCommands
export XHARNESSPATH=$XHARNESS_CLI_PATH
Expand All @@ -102,16 +102,40 @@
$(Python) test.py devicestartup --device-type ios --package-path MauiTesting.app --package-name net.dot.mauitesting --scenario-name "%(Identity)"
# Post commands
$(Python) post.py
$(Python) post.py
]]>
</CustomCommands>
</XHarnessAppBundleToTest>
<XHarnessAppBundleToTest Include="Device Startup - iOS Maui Blazor Default" Condition="'$(iOSLlvmBuild)' == 'False'">
<AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
<WorkItemTimeout>00:05:00</WorkItemTimeout>
<TestTarget>ios-device</TestTarget>
<CustomCommands>
<![CDATA[
# PreCommands
export XHARNESSPATH=$XHARNESS_CLI_PATH
cp -r $HELIX_CORRELATION_PAYLOAD/MauiBlazorTesting.app $(ScenarioDirectory)mauiblazorios/MauiBlazorTesting.app
cp -f embedded.mobileprovision $(ScenarioDirectory)mauiblazorios/MauiBlazorTesting.app
cd $(ScenarioDirectory)mauiblazorios
sign MauiBlazorTesting.app
$(Python) pre.py --name MauiBlazorTesting.app
# Testing commands
$(Python) test.py devicestartup --device-type ios --package-path MauiBlazorTesting.app --package-name net.dot.mauiblazortesting --scenario-name "%(Identity)"
# Post commands
$(Python) post.py
]]>
</CustomCommands>
</XHarnessAppBundleToTest>
</CustomCommands>
</XHarnessAppBundleToTest>
<XHarnessAppBundleToTest Include="Device Startup - iOS Maui Podcast" Condition="'$(iOSLlvmBuild)' == 'False'">
<AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
<WorkItemTimeout>00:05:00</WorkItemTimeout>
<TestTarget>ios-device</TestTarget>
<CustomCommands>
<![CDATA[
<AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
<WorkItemTimeout>00:05:00</WorkItemTimeout>
<TestTarget>ios-device</TestTarget>
<CustomCommands>
<![CDATA[
# PreCommands
export XHARNESSPATH=$XHARNESS_CLI_PATH
Expand All @@ -126,9 +150,9 @@
$(Python) test.py devicestartup --device-type ios --package-path Microsoft.NetConf2021.Maui.app --package-name net.dot.netconf2021.maui --scenario-name "%(Identity)"
# Post commands
$(Python) post.py
$(Python) post.py
]]>
</CustomCommands>
</XHarnessAppBundleToTest>
</CustomCommands>
</XHarnessAppBundleToTest>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions eng/testing/performance/performance-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,21 @@ if [[ "$iosmono" == "true" ]]; then
# NoLLVM Mono .app, Maui iOS IPA, Maui Maccatalyst, Maui iOS Podcast IPA
mkdir -p $payload_directory/iosHelloWorld/nollvm && cp -rv $source_directory/iosHelloWorld/nollvm $payload_directory/iosHelloWorld/nollvm
mkdir -p $payload_directory/MauiMacCatalystDefault && cp -rv $source_directory/MauiMacCatalystDefault/MauiMacCatalystDefault.app $payload_directory/MauiMacCatalystDefault
mkdir -p $payload_directory/MauiBlazorMacCatalystDefault && cp -rv $source_directory/MauiBlazorMacCatalystDefault/MauiBlazorMacCatalystDefault.app $payload_directory/MauiBlazorMacCatalystDefault
cp -v $source_directory/MauiiOSDefaultIPA/MauiiOSDefault.ipa $payload_directory/MauiiOSDefault.ipa
cp -v $source_directory/MauiBlazoriOSDefaultIPA/MauiBlazoriOSDefault.ipa $payload_directory/MauiBlazoriOSDefault.ipa
cp -v $source_directory/MauiiOSPodcastIPA/MauiiOSPodcast.ipa $payload_directory/MauiiOSPodcast.ipa

# Get the .app so we can resign in the xharness item
cp -v $source_directory/MauiiOSDefaultIPA/MauiiOSDefault.ipa $source_directory/MauiiOSDefaultIPA/MauiiOSDefault.zip
unzip -d $source_directory/MauiiOSDefaultIPA $source_directory/MauiiOSDefaultIPA/MauiiOSDefault.zip
mv $source_directory/MauiiOSDefaultIPA/Payload/MauiTesting.app $payload_directory/

# Get the .app so we can resign in the xharness item for Maui Blazor
cp -v $source_directory/MauiBlazoriOSDefaultIPA/MauiBlazoriOSDefault.ipa $source_directory/MauiBlazoriOSDefaultIPA/MauiBlazoriOSDefault.zip
unzip -d $source_directory/MauiBlazoriOSDefaultIPA $source_directory/MauiBlazoriOSDefaultIPA/MauiBlazoriOSDefault.zip
mv $source_directory/MauiBlazoriOSDefaultIPA/Payload/MauiBlazorTesting.app $payload_directory/

# Get the .app so we can resign in the xharness item for podcast
cp -v $source_directory/MauiiOSPodcastIPA/MauiiOSPodcast.ipa $source_directory/MauiiOSPodcastIPA/MauiiOSPodcast.zip
unzip -d $source_directory/MauiiOSPodcastIPA $source_directory/MauiiOSPodcastIPA/MauiiOSPodcast.zip
Expand Down

0 comments on commit d3149d4

Please sign in to comment.