-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
iOS Release pipelines taking an hour #25022
Comments
I know the hosted build agents are a bit underpowered so it definitely might run for a while there, if you run it locally, how long does it run there? Do you know? Not a great solution, but you can make the timeout longer with Looks like there is some additional info here too: actions/runner-images#10200 @rolfbjarne is there anything people can do here to speed this up? |
@jfversluis thanks, looks like i found that issue a few months back when I first started to look at the pipelines. Its increased by 12m since then - actions/runner-images#10200 (comment) Locally I think it only takes about 30m (still a massive jump compared to XF) |
@jfversluis I presume its this setting that's taking up all the time? if it is, do you know if there is an argument I can add to the publish command to turn it off so a build can be tested quicker when needed? - task: DotNetCoreCLI@2
displayName: 'Build the iOS Binaries'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'src/App/App.csproj'
arguments: '-f:net8.0-ios -c:Release /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false'
zipAfterPublish: false |
You can disable llvm by passing |
thanks @rolfbjarne, that takes it down to about the same as the android pipeline - |
The best way to diagnose any differences would be if we could get an MSBuild binlog from an older (fast) build + newer (slow) build, that way we can compare the exact differences in the build (if any). The binlogs will also have timings, to see where the time is spend, which would be really useful in this scenario. |
@rolfbjarne I have a feeling this is not a bug but a ADO agent issue , bcse depending on the time of the day I get different timings our nightly build took 23 mins during the day it took 40-50 mins and also I no longer have a way to get the "old" binlog etc but something is for sure its consistently slower and takes longer, I know this does not help you as you need "facts" binlogs to compare.. |
@rolfbjarne sorry for late reply, was on holiday 👌 Here is the .binlog file from a CI that took about 1h10m Tried looking at the logs myself using (https://msbuildlog.com) but couldn't see how to use it/ search it. Anyone else looking to generate the binlog file, I updated the above pipeline with - arguments: -f:net8.0-ios -c:Release /p:ArchiveOnBuild=true /p:MtouchUseLlvm=$(OptimiseBuild) /bl:msbuild.binlog -verbosity:diagnostic - task: CopyFiles@2
displayName: Copy .binlog files
inputs:
Contents: '**/*.binlog'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true |
The AOT compilation took an hour, which is pretty much all of it.
Disabling LLVM should make it much faster. The LLVM part of the compilation is really taxes the CPU, so if the bots are already underpowered / under load, things might unravel rather drastically if the load becomes too much for them. We automatically AOTCompile in parallel according to how many CPUs the machine has, which may cause problem if the machine is already under load. If this is the case, you can adjust the parallelism manually by setting the <PropertyGroup>
<AotCompileMaxDegreeOfParallelism>4</AotCompileMaxDegreeOfParallelism>
</PropertyGroup> Note: I'm assuming the before and after builds AOT-compile the same things and in the same way, but I can't confirm this without getting both a before and an after binlog. |
No response, assuming this is fixed! |
Description
iOS Azure CI pipeline taking an hour and causing it too fail -
All the steps are completed but takes almost an hour to produce a build -
Majority of the time it's stuck on -
Optimizing assemblies for size. This process might take a while.
Our XF iOS pipeline only takes 6m
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.91 SR9.1
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: