1cb93a386Sopenharmony_ciSkia Infrastructure 2cb93a386Sopenharmony_ci=================== 3cb93a386Sopenharmony_ci 4cb93a386Sopenharmony_ciThis directory contains infrastructure elements. 5cb93a386Sopenharmony_ci 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ciTasks and Jobs 8cb93a386Sopenharmony_ci-------------- 9cb93a386Sopenharmony_ci 10cb93a386Sopenharmony_ciFiles in this directory define a DAG of tasks which run at every Skia commit. A 11cb93a386Sopenharmony_citask is a small, self-contained unit which runs via Swarming on a machine in the 12cb93a386Sopenharmony_cipool. Tasks may be chained together, eg. one task to compile test binaries and 13cb93a386Sopenharmony_cianother to actually run them. 14cb93a386Sopenharmony_ci 15cb93a386Sopenharmony_ciJobs are collections of related tasks which help define sub-sections of the DAG, 16cb93a386Sopenharmony_cifor example, to be used as try jobs. Each job is defined as an entry point into 17cb93a386Sopenharmony_cithe DAG. 18cb93a386Sopenharmony_ci 19cb93a386Sopenharmony_ciThe tasks.json file in this directory is the list of tasks and jobs for 20cb93a386Sopenharmony_cithe repo. Note that tasks.json is NEVER edited by hand but generated via 21cb93a386Sopenharmony_cigen_task.go and the input files enumerated below. The 22cb93a386Sopenharmony_ci[Task Scheduler](https://skia.googlesource.com/buildbot/+/main/task_scheduler/README.md) 23cb93a386Sopenharmony_cireads the tasks.json file at each commit to determine which jobs to run. For 24cb93a386Sopenharmony_ciconvenience, gen_tasks.go is provided to generate tasks.json and also to test it 25cb93a386Sopenharmony_cifor correct syntax and detecting cycles and orphaned tasks. Always edit 26cb93a386Sopenharmony_cigen_tasks.go or one of the following input JSON files, rather than tasks.json 27cb93a386Sopenharmony_ciitself: 28cb93a386Sopenharmony_ci 29cb93a386Sopenharmony_ci * cfg.json - Basic configuration information for gen_tasks.go. 30cb93a386Sopenharmony_ci * jobs.json - The list of all jobs to run. Edit this to add or remove 31cb93a386Sopenharmony_ci bots. 32cb93a386Sopenharmony_ci 33cb93a386Sopenharmony_ciWhenever gen_tasks.go, any of the above JSON files, or assets are changed, you 34cb93a386Sopenharmony_cineed to run gen_tasks.go to regenerate tasks.json: 35cb93a386Sopenharmony_ci 36cb93a386Sopenharmony_ci $ go run infra/bots/gen_tasks.go 37cb93a386Sopenharmony_ci 38cb93a386Sopenharmony_ciOr: 39cb93a386Sopenharmony_ci 40cb93a386Sopenharmony_ci $ cd infra/bots; make train 41cb93a386Sopenharmony_ci 42cb93a386Sopenharmony_ciThere is also a test mode which performs consistency checks and verifies that 43cb93a386Sopenharmony_citasks.json is unchanged: 44cb93a386Sopenharmony_ci 45cb93a386Sopenharmony_ci $ go run infra/bots/gen_tasks.go --test 46cb93a386Sopenharmony_ci 47cb93a386Sopenharmony_ciOr: 48cb93a386Sopenharmony_ci 49cb93a386Sopenharmony_ci $ cd infra/bots; make test 50cb93a386Sopenharmony_ci 51cb93a386Sopenharmony_ci 52cb93a386Sopenharmony_ciRecipes 53cb93a386Sopenharmony_ci------- 54cb93a386Sopenharmony_ci 55cb93a386Sopenharmony_ciRecipes are the framework used by Skia's infrastructure to perform work inside 56cb93a386Sopenharmony_ciof Swarming tasks. The main elements are: 57cb93a386Sopenharmony_ci 58cb93a386Sopenharmony_ci * recipes.py - Used for running and testing recipes. 59cb93a386Sopenharmony_ci * recipes - These are the entry points for each type of task, eg. compiling 60cb93a386Sopenharmony_ci or running tests. 61cb93a386Sopenharmony_ci * recipe_modules - Shared modules which are used by recipes. 62cb93a386Sopenharmony_ci * .recipe_deps - Recipes and modules may depend on modules from other repos. 63cb93a386Sopenharmony_ci The recipes.py script automatically syncs those dependencies in this 64cb93a386Sopenharmony_ci directory. 65cb93a386Sopenharmony_ci 66cb93a386Sopenharmony_ci 67cb93a386Sopenharmony_ciIsolate Files 68cb93a386Sopenharmony_ci------------- 69cb93a386Sopenharmony_ci 70cb93a386Sopenharmony_ciThese files determine which parts of the repository are transferred to the bot 71cb93a386Sopenharmony_ciwhen a Swarming task is triggered. The 72cb93a386Sopenharmony_ci[Isolate tool](https://github.com/luci/luci-py/tree/main/appengine/isolate/doc) 73cb93a386Sopenharmony_cihashes each file and will upload any new/changed files. Bots maintain a cache so 74cb93a386Sopenharmony_cithat they can efficiently download only the files they don't have. 75cb93a386Sopenharmony_ci 76cb93a386Sopenharmony_ci 77cb93a386Sopenharmony_ciAssets 78cb93a386Sopenharmony_ci------ 79cb93a386Sopenharmony_ci 80cb93a386Sopenharmony_ciArtifacts used by the infrastructure are versioned here, along with scripts for 81cb93a386Sopenharmony_cirecreating/uploading/downloading them. See the README in that directory for more 82cb93a386Sopenharmony_ciinformation. Any time an asset used by the bots changes, you need to re-run 83cb93a386Sopenharmony_cigen_tasks.go. 84cb93a386Sopenharmony_ci 85cb93a386Sopenharmony_ci 86cb93a386Sopenharmony_ciTools 87cb93a386Sopenharmony_ci----- 88cb93a386Sopenharmony_ci 89cb93a386Sopenharmony_ciAssorted other infrastructure-related tools, eg. isolate and CIPD binaries. 90cb93a386Sopenharmony_ci 91cb93a386Sopenharmony_ci 92cb93a386Sopenharmony_ciCT 93cb93a386Sopenharmony_ci-- 94cb93a386Sopenharmony_ci 95cb93a386Sopenharmony_ciHelpers for running Skia tasks in Cluster Telemetry. 96cb93a386Sopenharmony_ci 97