feat: files.no-auto-import
This commit is contained in:
parent
701541c032
commit
dd5f1123b4
|
@ -132,6 +132,9 @@ class StageFiles(StrictBaseModel):
|
|||
import_map: Dict[str, str] = Field(
|
||||
{}, validation_alias=AliasChoices("import-map", "import_map")
|
||||
)
|
||||
no_auto_import: List[str] = Field(
|
||||
[], validation_alias=AliasChoices("no-auto-import", "no_auto_import")
|
||||
)
|
||||
|
||||
|
||||
class Limit(StrictBaseModel):
|
||||
|
|
|
@ -105,7 +105,11 @@ def get_executor_with(
|
|||
copy_in=copy_in,
|
||||
copy_in_dir="." if task_stage.copy_in_cwd else "",
|
||||
copy_out=copy_out_files,
|
||||
copy_in_cached={file: file for file in cached},
|
||||
copy_in_cached={
|
||||
file: file
|
||||
for file in cached
|
||||
if file not in task_stage.files.no_auto_import
|
||||
},
|
||||
copy_out_cached=file_export,
|
||||
cpu_limit=task_stage.limit.cpu,
|
||||
clock_limit=task_stage.limit.time,
|
||||
|
|
|
@ -66,6 +66,8 @@ files.import-map = { "tools/Makefile" = "h7/Makefile" }
|
|||
# files to export from the sandbox, relative to `/w`, will be imported to later
|
||||
# stages automatically
|
||||
files.export = [ "yes.txt" ]
|
||||
# files that should not be imported from the `export` field in previous stages
|
||||
files.no-auto-import = [ "yes.txt" ]
|
||||
# whether to copy all files from the current working directory from host (i.e. the whole repo)
|
||||
# you can set it as false if you are in the run stage of a compiled language, as the binary is all you need
|
||||
copy-in-cwd = true # default: true
|
||||
|
|
Loading…
Reference in New Issue
Block a user