run_pgo_profile.py (1123B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 """ 5 Apply some defaults and minor modifications to the pgo jobs. 6 """ 7 8 import logging 9 10 from taskgraph.transforms.base import TransformSequence 11 12 logger = logging.getLogger(__name__) 13 14 transforms = TransformSequence() 15 16 17 @transforms.add 18 def run_profile_data(config, jobs): 19 for job in jobs: 20 build_platform = job["attributes"].get("build_platform") 21 instr = "instrumented-build-{}".format(job["name"]) 22 if "android" in build_platform: 23 artifact = "geckoview-test_runner.apk" 24 elif "macosx64" in build_platform: 25 artifact = "target.dmg" 26 elif "win" in build_platform: 27 artifact = "target.zip" 28 else: 29 artifact = "target.tar.xz" 30 job.setdefault("fetches", {})[instr] = [ 31 {"artifact": artifact, "extract": not artifact.endswith((".dmg", ".apk"))}, 32 "target.crashreporter-symbols.zip", 33 ] 34 yield job