Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: docs/ios_infra.md

Issue 2667253003: Add iOS infra documentation (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Continuous build and test infrastructure for Chromium for iOS
2
3 See the [instructions] for how to check out and build Chromium for iOS.
4
5 The Chromium projects use buildbot for continuous integration. This doc starts
6 with an overview of the system, then gives detailed explanations about each
7 part.
8
9 [TOC]
10
11 ## Overview
12
13 Commits are made using the [commit queue], which triggers a series of try jobs
14 to compile and test the proposed patch against Chromium tip of tree before
15 actually making the commit. If the try jobs succeed the patch is committed. A
16 newly committed change triggers the builders (or "bots") to compile and test
17 the change again.
18
19 ## Bots
20
21 Bots are slaves attached to a buildbot master (or "waterfall"). A buildbot
22 master is a server which polls for commits to a repository and triggers workers
23 to compile and test new commits whenever they are detected. [chromium.mac] is
24 the main waterfall for Mac desktop and iOS. [tryserver.chromium.mac] serves
25 as the try server for Mac desktop and iOS.
26
27 The bots know how to check out a given revision of Chromium, compile, and test.
28
29 ### Code location
30
31 #### Master configs
32
33 The masters are configured in [tools/build], a separate repository which
34 contains various infra-related scripts.
35
36 #### Pollers
37
38 [chromium.mac] uses a `GitilesPoller` which polls the Chromium repository for
39 new commits using the [gitiles] interface. When a new commit is detected, the
40 bots are triggered.
41
42 #### Recipes
43
44 The bots run [recipes], which are scripts that specify their sequence of steps
45 located in [tools/build]. An iOS-specific [recipe module] contains common
46 functionality that the various [iOS recipes] use.
47
48 #### Configs
49
50 Because the recipes live in another repository, changes to the recipes don't
51 go through the Chromium [commit queue] and aren't tested on the [try server].
52 In order to allow bot changes to be tested by the commit queue, the recipes
53 for iOS are generic instead of bot-specific, and rely on configuration files
54 which live in master-specific JSON config files located in [src/ios/build/bots].
55 These configs define the `gn_args` to use during compilation as well as the
56 tests to run.
57
58 #### Scripts
59
60 The [test runner] is the script which installs and runs the tests, interprets
61 the results, and collects any files emitted by the test ("test data"). It can
62 be found in [src/ios/build/bots/scripts], which means changes to the test runner
63 can be tested on the [try server].
64
65 ### Compiling with goma
66
67 Goma is the distributed build system used by Chromium. It reduces compilation
68 time by avoiding recompilation of objects which have already been compiled
69 elsewhere.
70
71 ### Testing with swarming
72
73 Tests run on [swarming], a distributed test system used by Chromium. After
74 compilation, configured tests will be zipped up along with their necessary
75 dependencies ("isolated") and sent to the [swarming server] for execution. The
76 server issues tasks to its attached workers for execution. The bots themselves
77 don't run any tests, they trigger tests to be run remotely on the swarming
78 server, then wait and display the results. This allows multiple tests to be
79 executed in parallel.
80
81 ## Try bots
82
83 Try bots are bots which test proposed patches which are not yet committed.
84
85 Request [try job access] in order to trigger try jobs against your patch. The
86 relevant try bots for an iOS patch are `ios-device`, `ios-device-xcode-clang`,
87 `ios-simulator`, and `ios-simulator-xcode-clang`. These bots can be found on
88 the Mac-specific [try server]. A try job is said to succeed when the build
89 passes (i.e. when the bot successfully compiles and tests the patch).
90
91 `ios-device` and `ios-device-xcode-clang` both compile for the iOS device
92 architecture (ARM), and neither run any tests. A build is considered successful
93 so long as compilation is successful.
94
95 `ios-simulator` and `ios-simulator-xcode-clang` both compile for the iOS
96 simulator architecture (x86), and run tests in the iOS [simulator]. A build is
97 considered successful when both compilation and all configured test succeed.
98
99 `ios-device` and `ios-simulator` both compile using the version of [clang]
100 defined by the `CLANG_REVISION` in the Chromium tree.
101
102 `ios-device-xcode-clang` and `ios-simulator-xcode-clang` both compile using the
103 version of clang that ships with Xcode.
104
105 ### Scheduling try jobs using buildbucket
106
107 Triggering a try job and collecting its results is accomplished using
108 [buildbucket]. The service allows for build requests to be put into buckets. A
109 request in this context is a set of properties indicating things such as where
110 to get the patch. The try bots are set up to poll a particular bucket for build
111 requests which they execute and post the results of.
112
113 ### Compiling with the analyzer
114
115 In addition to goma, the try bots use another time-saving mechanism called the
116 [analyzer] to determine the subset of compilation targets affected by the patch
117 that need to be compiled in order to run the affected tests. If a patch is
118 determined not to affect a certain test target, compilation and execution of the
119 test target will be skipped.
120
121 [analyzer]: ../tools/mb
122 [buildbucket]: https://cr-buildbucket.appspot.com
123 [chromium.mac]: https://build.chromium.org/p/chromium.mac
124 [clang]: ../tools/clang
125 [commit queue]: https://dev.chromium.org/developers/testing/commit-queue
126 [gitiles]: https://gerrit.googlesource.com/gitiles
127 [instructions]: ./ios_build_instructions.md
128 [iOS recipes]: https://chromium.googlesource.com/chromium/tools/build/+/master/s cripts/slave/recipes/ios
129 [recipe module]: https://chromium.googlesource.com/chromium/tools/build/+/master /scripts/slave/recipe_modules/ios
130 [recipes]: https://chromium.googlesource.com/infra/infra/+/HEAD/doc/users/recipe s.md
131 [simulator]: https://developer.apple.com/library/content/documentation/IDEs/Conc eptual/iOS_Simulator_Guide/Introduction/Introduction.html
132 [src/ios/build/bots]: ../ios/build/bots
133 [src/ios/build/bots/scripts]: ../ios/build/bots/scripts
134 [swarming]: https://github.com/luci/luci-py/tree/master/appengine/swarming
135 [swarming server]: https://chromium-swarm.appspot.com
136 [test runner]: ../ios/build/bots/scripts/test_runner.py
137 [tools/build]: https://chromium.googlesource.com/chromium/tools/build
138 [try job access]: https://www.chromium.org/getting-involved/become-a-committer#T OC-Try-job-access
139 [try server]: https://build.chromium.org/p/tryserver.chromium.mac/waterfall
140 [tryserver.chromium.mac]: https://build.chromium.org/p/tryserver.chromium.mac/wa terfall
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698