Lines Matching +full:repo +full:- +full:name
11 # http://www.apache.org/licenses/LICENSE-2.0
23 Get and build dependent repositories using known-good commits.
26 -------
31 repository at a "known-good" commit in order to provide stability in
35 --------------------
39 Known-Good JSON Database
40 ------------------------
42 This program expects to find a file named "known-good.json" in the
47 ---------------
49 See the help text (update_deps.py --help) for a complete list of options.
52 -----------------
56 repositories. The user can override this by using the "--dir" option.
64 $ cd My-Repo
69 or, to do the same thing, but using the --dir option:
71 $ cd My-Repo
73 $ scripts/update_deps.py --dir=build
82 $ cd My-Repo
83 $ scripts/update_deps.py --dir=/tmp/deps
89 ------------------------
99 $ git clone git@github.com:My-Group/My-Repo.git
100 $ cd My-Repo
104 $ cmake -C helper.cmake ..
105 $ cmake --build .
108 ----------------
110 There's no formal schema for the "known-good" JSON file, but here is
115 - name
117 The name of the dependent repository. This field can be referenced
120 - url
123 Example: https://github.com/KhronosGroup/Vulkan-Loader.git
125 - sub_dir
130 - build_dir
135 - install_dir
140 - commit
142 The commit used to checkout the repository. This can be a SHA-1
143 object name or a refname used with the remote name "origin".
144 For example, this field can be set to "origin/sdk-1.1.77" to
145 select the end of the sdk-1.1.77 branch.
147 - deps (optional)
149 An array of pairs consisting of a CMake variable name and a
150 repository name to specify a dependent repo and a "link" to
151 that repo's install artifacts. For example:
156 "repo_name" : "Vulkan-Headers"
160 which represents that this repository depends on the Vulkan-Headers
162 specify the location where it expects to find the Vulkan-Headers install
164 Note that the "repo_name" element must match the "name" element of some
167 - prebuild (optional)
168 - prebuild_linux (optional) (For Linux and MacOS)
169 - prebuild_windows (optional)
179 - custom_build (optional)
195 {2} returns the CONFIG_MAP value of config e.g. debug -> Debug
197 {0}[Vulkan-Headers][repo_root] returns the repo_root variable from
198 the Vulkan-Headers GoodRepo object.
200 - cmake_options (optional)
204 - ci_only (optional)
207 (case-insensitive) in order for this repo to be fetched and built.
211 name to "true". Note that this could also be (ab)used to control
212 the processing of the repo with any environment variable. The default
213 is an empty list, which means that the repo is always processed.
215 - build_step (optional)
221 - build_platforms (optional)
232 ----
236 supported. However, the "top" directory specified with the "--dir"
289 """Represents a repository at a known-good commit."""
292 """Initializes this good repo object.
295 'json': A fully populated JSON object describing the repo.
301 self.name = json['name']
324 # Absolute paths for a repo's directories
344 print('Checking out {n} in {d}'.format(n=self.name, d=self.repo_dir))
360 """Execute any prebuild steps from the repo root"""
371 """Execute any custom_build steps from the repo root"""
389 '-DCMAKE_INSTALL_PREFIX=' + self.install_dir
392 # For each repo this repo depends on, generate a CMake variable
394 # repo's install dir.
396 dep_commit = [r for r in repos if r.name == d['repo_name']]
398 cmake_cmd.append('-D{var_name}={install_dir}'.format(
406 # Set build config for single-configuration generators
408 cmake_cmd.append('-DCMAKE_BUILD_TYPE={config}'.format(
411 # Use the CMake -A option to select the platform architecture
415 cmake_cmd.append('-A')
422 cmake_cmd.extend(['-G', self._args.generator])
433 cmake_cmd = ['cmake', '--build', self.build_dir, '--target', 'install']
435 cmake_cmd.append('--clean-first')
438 cmake_cmd.append('--config')
443 cmake_cmd.append('--')
450 print('warning: environment variable MAKE_JOBS has non-numeric value "{}". '
452 cmake_cmd.append('-j{}'.format(num_make_jobs))
454 cmake_cmd.append('--')
465 """Build the dependent repo"""
466 print('Building {n} in {d}'.format(n=self.name, d=self.repo_dir))
487 The known-good file is expected to be in the same
499 GoodRepo(repo, args)
500 for repo in json.loads(known_good.read())['repos']
507 The known-good file is expected to be in the same
528 The helper file is intended to be used with 'cmake -C <file>'
529 to build this home repo using the dependencies built by this script.
532 home repo to locate the install dirs of the dependent repos.
533 This information is baked into the CMake files of the home repo and so
534 this dictionary is kept with the repo via the json file.
540 for repo in repos:
541 if install_names and repo.name in install_names and repo.on_build_platform:
544 var=install_names[repo.name],
545 dir=escape(repo.install_dir)))
550 description='Get and build dependent repos at known-good commits')
552 '--known_good_dir',
556 '--dir',
561 '--ref',
566 '--no-build',
573 '--clean',
579 '--clean-repo',
585 '--clean-build',
591 '--clean-install',
597 '--arch',
604 '--config',
611 '--generator',
627 for repo in repos:
628 # If the repo has a platform whitelist, skip the repo
630 if not repo.on_build_platform:
649 repo_dict[repo.name] = {field: getattr(repo, field) for field in field_list}
651 # If the repo has a CI whitelist, skip the repo unless
653 if len(repo.ci_only):
655 for env in repo.ci_only:
665 repo.Checkout()
668 if args.do_build and repo.build_step != 'skip':
669 repo.Build(repos, repo_dict)