MCPcopy Create free account
hub / github.com/carbonengine/trinity / build

Function build

shadercompiler/pythonBuildScript/build.py:211–238  ·  view source on GitHub ↗
(paths, vcs, incremental, platforms=SUPPORTED_PLATFORMS, shader_models=tuple(SHADER_MODELS),
          shader_compiler=SHADER_COMPILER, warnings=True, staging='')

Source from the content-addressed store, hash-verified

209
210
211def build(paths, vcs, incremental, platforms=SUPPORTED_PLATFORMS, shader_models=tuple(SHADER_MODELS),
212 shader_compiler=SHADER_COMPILER, warnings=True, staging=''):
213 files = set(flatten_paths(paths))
214 logging.debug(f'Discovered {len(files)} files to build')
215 if not files:
216 return True
217
218 extra_args = get_extra_args()
219 if staging:
220 os.makedirs(staging, exist_ok=True)
221
222 work_items = []
223 for each in files:
224 work_items.extend(get_outputs(each, platforms or SUPPORTED_PLATFORMS, shader_models or SHADER_MODELS,
225 shader_compiler, warnings, extra_args, staging))
226
227 if incremental:
228 work_items = list(get_modified(shader_compiler, work_items, extra_args))
229 if not work_items:
230 logging.info('All files are up to date')
231 return True
232
233 logging.debug(f'Starting build for {len(work_items)} outputs')
234 outputs = [x.dest for x in work_items]
235 vcs.pre_build(outputs)
236 success = WorkItemProcessor().process(work_items)
237 vcs.submit(outputs, success)
238 return success
239
240
241class Perforce:

Callers 1

mainFunction · 0.85

Calls 8

flatten_pathsFunction · 0.85
get_extra_argsFunction · 0.85
get_outputsFunction · 0.85
get_modifiedFunction · 0.85
WorkItemProcessorClass · 0.85
pre_buildMethod · 0.80
processMethod · 0.80
submitMethod · 0.80

Tested by

no test coverage detected