These yml files are used to provide CI builds using the Azure DevOps Pipeline Service. Most of the CI leverages edk2-pytools to support cross platform building and execution.
Focused on building and testing all packages in Edk2 without an actual target platform.
See .pytools/ReadMe.py
for more details
Focused on building a single target platform and confirming functionality on that platform.
<PlatformPkg>/.azurepipelines
folder.templates
folder.<host os>-<tool_chain_tag>.yml
They are great but evil. If they are used as part of determining the steps of a build they must resolve before the build starts. They can not use variables set in a yml or determined as part of a matrix. If they are used in a step then they can be bound late.
On Linux this can hang if there are too many files in the search list.
Suggestion is to do one big yaml file that does what you want for one of your targets. Then do the second one and find the deltas. From that you can start to figure out the right split of files, steps, jobs.
If you want the step to show up in the log but not run, use a step conditional. This is great when a platform doesn't currently support a feature but you want the builders to know that the features exists and maybe someday it will.
If you want the step to not show up use a template step conditional wrapper. Beware this will be evaluated early (at build start). This can hide things not needed on a given OS for example.