Skip to content

Conversation

@LoopedBard3
Copy link
Member

This adds Maui Mobile scenarios for android, including android default, android podcast app, and blazor android. This also updates how the dotnet version commit date is retrieved to minimize throttling from running in public pools.

…cted size sod testing by adding precommands to extract the apk zip.

# Download what we need
with open ("MauiNuGet.config", "wb") as f:
f.write(requests.get(f'https://raw.githubusercontent.com/dotnet/maui/net7.0/NuGet.config', allow_redirects=True).content)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this will get (forward)ported to main eventually and hence the net7.0 here (and below) should come from variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed

with open ("MauiNuGet.config", "wb") as f:
f.write(requests.get(f'https://raw.githubusercontent.com/dotnet/maui/net7.0/NuGet.config', allow_redirects=True).content)

subprocess.run(['git', 'clone', 'https://github.com/microsoft/dotnet-podcasts.git', '-b', 'net7.0', '--single-branch', '--depth', '1'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you considered using submodule?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not, but looking into submodules more, I think that the submodule commands would be overdoing what we need and come with additional cost of either merging the submodule each time the podcast app updates or having to call git multiple times to add and then init the submodule. However, since I have not used it much before I may just be misunderstanding the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can track tip of branch with submodule. But my comment was purely question. I don't think either is superior solution and both work for me.

os.remove(f"{output_file_partial_path}.aab")

# Copy the MauiVersion to a file so we have it on the machine
result = subprocess.run(['powershell', '-Command', rf'Get-ChildItem .\{const.APPDIR}\obj\Release\net7.0-android\android-arm64\linked\Microsoft.Maui.dll | Select-Object -ExpandProperty VersionInfo | Select-Object ProductVersion | Select-Object -ExpandProperty ProductVersion'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. And even parts of Python code are duplicated in pre.py/test.py. This could be refactored, once in final stretch, to separate files.

@LoopedBard3
Copy link
Member Author

Working test run since this only runs on private builds: https://dev.azure.com/dnceng/internal/_build/results?buildId=2068946&view=results

@LoopedBard3 LoopedBard3 marked this pull request as ready for review December 28, 2022 22:07
@LoopedBard3 LoopedBard3 marked this pull request as draft December 28, 2022 22:07
@LoopedBard3 LoopedBard3 marked this pull request as ready for review January 23, 2023 19:00
@LoopedBard3
Copy link
Member Author

@LoopedBard3
Copy link
Member Author

Errors are unrelated to these changes, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants