feat: support copy_in_cwd
All checks were successful
build / build (push) Successful in 1m49s

This commit is contained in:
张泊明518370910136 2025-06-02 18:55:44 -04:00
parent 8c1c3fa881
commit e1e3d59492
GPG Key ID: D47306D7062CDA9D
4 changed files with 4 additions and 1 deletions

View File

@ -106,6 +106,7 @@ class Stage(BaseModel):
files: Files = Files() files: Files = Files()
in_: str = Field("", alias="in") in_: str = Field("", alias="in")
out_: str = Field("", alias="out") out_: str = Field("", alias="out")
copy_in_cwd: bool = True
score: int = 0 score: int = 0
parsers: List[Parser] = [] # list of parsers parsers: List[Parser] = [] # list of parsers
limit: Limit = Limit() limit: Limit = Limit()

View File

@ -94,6 +94,7 @@ def get_executor_with(
# TODO: are there any corner cases? # TODO: are there any corner cases?
for file in copy_in_files for file in copy_in_files
}, },
copy_in_dir="." if task_stage.copy_in_cwd else "",
copy_out=copy_out_files, copy_out=copy_out_files,
copy_in_cached={file: file for file in cached}, copy_in_cached={file: file for file in cached},
copy_out_cached=file_export, copy_out_cached=file_export,

View File

@ -733,7 +733,7 @@
"h7/build/ex2-msan": "h7/build/ex2-msan", "h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json" "h7/build/compile_commands.json": "h7/build/compile_commands.json"
}, },
"copyInDir": ".", "copyInDir": "",
"copyOut": [ "copyOut": [
"stdout", "stdout",
"stderr" "stderr"

View File

@ -77,6 +77,7 @@ result-detail.mem = false
[[stages]] [[stages]]
name = "[joj] ex2-asan" name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a" command="./h7/build/ex2-asan -a"
copy_in_cwd = false
files.import = [ "h7/build/ex2-asan" ] files.import = [ "h7/build/ex2-asan" ]
limit.mem = "128m" limit.mem = "128m"