add AOT smoke tests to Cirrus (#22751)

diff --git a/dev/bots/test.dart b/dev/bots/test.dart
index 3a8b62d..a49a1a5 100644
--- a/dev/bots/test.dart
+++ b/dev/bots/test.dart
@@ -21,6 +21,7 @@
 const Map<String, ShardRunner> _kShards = <String, ShardRunner>{
   'tests': _runTests,
   'tool_tests': _runToolTests,
+  'aot_build_tests': _runAotBuildTests,
   'coverage': _runCoverage,
 };
 
@@ -149,6 +150,27 @@
   print('${bold}DONE: All tests successful.$reset');
 }
 
+/// Verifies that AOT builds of some examples apps finish
+/// without crashing. It does not actually launch the AOT-built
+/// apps. That happens later in the devicelab. This is just
+/// a smoke-test.
+Future<void> _runAotBuildTests() async {
+  await _flutterBuildAot(path.join('examples', 'hello_world'));
+  await _flutterBuildAot(path.join('examples', 'flutter_gallery'));
+  await _flutterBuildAot(path.join('examples', 'flutter_view'));
+
+  print('${bold}DONE: All AOT build tests successful.$reset');
+}
+
+Future<void> _flutterBuildAot(String relativePathToApplication) {
+  return runCommand(flutter,
+    <String>['build', 'aot'],
+    workingDirectory: path.join(flutterRoot, relativePathToApplication),
+    expectNonZeroExit: false,
+    timeout: _kShortTimeout,
+  );
+}
+
 Future<void> _runTests() async {
   await _runSmokeTests();