From 6043ed9e62ec9c72f04930c711e65142675b4187 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 23 Jan 2023 13:52:21 +0100 Subject: [PATCH] Build: checkout assets directory automatically This changes `make update` to download the assets repository automatically if it does not exist already. If it does exist, it is updated. Precompiled libraries have the same behavior. This is required for T103620. `pipeline_config.yaml` is updated as well for the builtbot. Differential Revision: https://developer.blender.org/D17090 --- build_files/config/pipeline_config.yaml | 4 ++++ build_files/utils/make_update.py | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 392bd842586..88ca5108e8b 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -43,6 +43,10 @@ update-code: branch: trunk commit_id: HEAD path: lib/benchmarks + assets: + branch: trunk + commit_id: HEAD + path: lib/assets # # Buildbot only configs diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index fbadeecd597..2288a9972b8 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -104,17 +104,30 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None svn_url_tests = svn_url + lib_tests call(svn_non_interactive + ["checkout", svn_url_tests, lib_tests_dirpath]) - # Update precompiled libraries and tests + lib_assets = "assets" + lib_assets_dirpath = os.path.join(lib_dirpath, lib_assets) + + if not os.path.exists(lib_assets_dirpath): + print_stage("Checking out Assets") + + if make_utils.command_missing(args.svn_command): + sys.stderr.write("svn not found, can't checkout assets\n") + sys.exit(1) + + svn_url_assets = svn_url + lib_assets + call(svn_non_interactive + ["checkout", svn_url_assets, lib_assets_dirpath]) + + # Update precompiled libraries, assets and tests if not os.path.isdir(lib_dirpath): print("Library path: %r, not found, skipping" % lib_dirpath) else: paths_local_and_remote = [] if os.path.exists(os.path.join(lib_dirpath, ".svn")): - print_stage("Updating Precompiled Libraries and Tests (one repository)") + print_stage("Updating Precompiled Libraries, Assets and Tests (one repository)") paths_local_and_remote.append((lib_dirpath, svn_url)) else: - print_stage("Updating Precompiled Libraries and Tests (multiple repositories)") + print_stage("Updating Precompiled Libraries, Assets and Tests (multiple repositories)") # Separate paths checked out. for dirname in os.listdir(lib_dirpath): if dirname.startswith("."):