• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:repo

4 # Copyright (c) 2018-2023 Valve Corporation
5 # Copyright (c) 2018-2023 LunarG, Inc.
6 # Copyright (c) 2023-2023 RasterGrid Kft.
12 # http://www.apache.org/licenses/LICENSE-2.0
24 Get and build dependent repositories using known-good commits.
27 -------
32 repository at a "known-good" commit in order to provide stability in
35 Known-Good JSON Database
36 ------------------------
38 This program expects to find a file named "known-good.json" in the
43 ---------------
45 See the help text (update_deps.py --help) for a complete list of options.
48 -----------------
52 repositories. The user can override this by using the "--dir" option.
60 $ cd My-Repo
65 or, to do the same thing, but using the --dir option:
67 $ cd My-Repo
69 $ scripts/update_deps.py --dir=build
78 $ cd My-Repo
79 $ scripts/update_deps.py --dir=/tmp/deps
85 ------------------------
95 $ git clone git@github.com:My-Group/My-Repo.git
96 $ cd My-Repo
100 $ cmake -C helper.cmake ..
101 $ cmake --build .
104 ----------------
106 There's no formal schema for the "known-good" JSON file, but here is
111 - name
116 - api
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
145 - deps (optional)
148 repository name to specify a dependent repo and a "link" to
149 that repo's install artifacts. For example:
154 "repo_name" : "Vulkan-Headers"
158 which represents that this repository depends on the Vulkan-Headers
160 specify the location where it expects to find the Vulkan-Headers install
165 - prebuild (optional)
166 - prebuild_linux (optional) (For Linux and MacOS)
167 - prebuild_windows (optional)
177 - custom_build (optional)
193 {2} returns the CONFIG_MAP value of config e.g. debug -> Debug
195 {0}[Vulkan-Headers][repo_root] returns the repo_root variable from
196 the Vulkan-Headers GoodRepo object.
198 - cmake_options (optional)
202 - ci_only (optional)
205 (case-insensitive) in order for this repo to be fetched and built.
208 - build_step (optional)
214 - build_platforms (optional)
226 ----
230 supported. However, the "top" directory specified with the "--dir"
265 shutil.rmtree function can fail on Windows due to read-only files.
297 # and prints them properly in case there is a non-zero exit code.
316 """Represents a repository at a known-good commit."""
319 """Initializes this good repo object.
322 'json': A fully populated JSON object describing the repo.
353 # Absolute paths for a repo's directories
363 # However, we need to account for cross-compiling.
419 …url_changed = command_output(['git', 'config', '--get', 'remote.origin.url'], self.repo_dir).strip…
443 """Execute any prebuild steps from the repo root"""
454 """Execute any custom_build steps from the repo root"""
459 exit(-1)
480 '-DCMAKE_INSTALL_PREFIX=' + self.install_dir
486 cmake_cmd.append('-D{}={}'.format(pieces[0], pieces[1]))
488 # For each repo this repo depends on, generate a CMake variable
490 # repo's install dir.
494 cmake_cmd.append('-D{var_name}={install_dir}'.format(
502 …# Set build config for single-configuration generators (this is a no-op on multi-config generators)
503 cmake_cmd.append(f'-D CMAKE_BUILD_TYPE={CONFIG_MAP[self._args.config]}')
506 # CMAKE_OSX_ARCHITECTURES must be a semi-colon seperated list
508 cmake_cmd.append(f'-D CMAKE_OSX_ARCHITECTURES={cmake_osx_archs}')
510 # Use the CMake -A option to select the platform architecture
513 cmake_cmd.append('-A')
527 cmake_cmd.extend(['-G', self._args.generator])
532 cmake_cmd.append("--no-warn-unused-cli")
538 …cmake_cmd = ['cmake', '--build', self.build_dir, '--target', 'install', '--config', CONFIG_MAP[sel…
540 cmake_cmd.append('--clean-first')
544 cmake_cmd.append('--parallel')
550 """Build the dependent repo and time how long it took"""
566 total_time = time.time() - start
576 The known-good file is expected to be in the same
588 GoodRepo(repo, args)
589 for repo in json.loads(known_good.read())['repos']
596 The known-good file is expected to be in the same
617 The helper file is intended to be used with 'cmake -C <file>'
618 to build this home repo using the dependencies built by this script.
621 home repo to locate the install dirs of the dependent repos.
622 This information is baked into the CMake files of the home repo and so
623 this dictionary is kept with the repo via the json file.
627 for repo in repos:
628 # If the repo has an API tag and that does not match
630 if repo.api is not None and repo.api != args.api:
632 if install_names and repo.name in install_names and repo.on_build_platform:
635 var=install_names[repo.name],
636 dir=escape(repo.install_dir)))
641 description='Get and build dependent repos at known-good commits')
643 '--known_good_dir',
647 '--dir',
652 '--ref',
657 '--no-build',
664 '--clean',
670 '--clean-repo',
676 '--clean-build',
682 '--clean-install',
688 '--skip-existing-install',
694 '--arch',
701 '--config',
708 '--api',
714 '--generator',
719 '--optional',
722 …help="Comma-separated list of 'optional' resources that may be skipped. Only 'tests' is currently …
725 '--cmake_var',
729 …help="Add CMake command line option -D'VAR'='VALUE' to the CMake generation command line; may be u…
732 '--osx-archs',
752 for repo in repos:
753 # If the repo has an API tag and that does not match
755 if repo.api is not None and repo.api != args.api:
758 # If the repo has a platform whitelist, skip the repo
760 if not repo.on_build_platform:
763 # Skip building the repo if its install directory already exists
767 if args.skip_existing_install and os.path.isdir(repo.install_dir):
768 … print('Skipping build for repo {n} due to existing install directory'.format(n=repo.name))
771 # Skip test-only repos if the --tests option was not passed in
772 if repo.IsOptional(args.optional):
791 repo_dict[repo.name] = {field: getattr(repo, field) for field in field_list}
793 # If the repo has a CI whitelist, skip the repo unless
795 if len(repo.ci_only):
797 for env in repo.ci_only:
807 repo.Checkout()
810 if args.do_build and repo.build_step != 'skip':
811 repo.Build(repos, repo_dict)