feat: longer sampe
parent
66e3a40d62
commit
c21b5b3152
|
@ -93,6 +93,8 @@ Global options:
|
|||
- `release.deadline [offset date-time]`: RFC 3339 formatted date-time with offset
|
||||
- `limit.cpu [int]`: default maximum running time used for all stages in sec (default: `4`)
|
||||
- `limit.mem [int]`: default maximum amount of RAM allowed for all stages in MB (default: `4`)
|
||||
- `limit.stdout [int]`: default `stdout` size applicable to all stages in kB (default: `4`)
|
||||
- `limit.stderr [int]`: default `stderr` size applicable to all stages in kB (default: `4`)
|
||||
|
||||
Each stage is configured in a table. All parameters following a table definition belong to it until
|
||||
the next table is defined.
|
||||
|
@ -102,9 +104,12 @@ the next table is defined.
|
|||
driver and header files needed for compilation)
|
||||
- `files.export [array of string]`: list of generated files to export to ensure future commands run as expected (eg.
|
||||
binaries needed for online-judge stages)
|
||||
- `name [string]`: stage name to display (default: `stagename`)
|
||||
- `parsers [array of string]`: list of parsers to run on the output of `command`
|
||||
- `limit.cpu [int]`: maximum running time for the stage in sec (default: `4`)
|
||||
- `limit.mem [int]`: maximum amount of RAM allowed for stage of step in MB (default: `4`)
|
||||
- `limit.mem [int]`: maximum amount of RAM allowed for the stage in MB (default: `4`)
|
||||
- `limit.stdout [int]`: default `stdout` size applicable to the stage in kB (default: `4`)
|
||||
- `limit.stderr [int]`: default `stderr` size applicable to the stage in kB (default: `4`)
|
||||
|
||||
|
||||
Any online-judge stage *must* feature the keyword `judge`, eg. `judge`, `judge-base`, `asan-judge` are all valid online-judge
|
||||
|
@ -114,8 +119,6 @@ An online-judge stage is configure as any other stage, ie. using the above optio
|
|||
extra parameter:
|
||||
- `skip [array of string]`: list of test cases to skip for this stage (default: `[ ]`)
|
||||
|
||||
By default all available test-cases are tested, unless some are marked as `skip`.
|
||||
|
||||
|
||||
### Parsers
|
||||
|
||||
|
@ -234,7 +237,7 @@ score = 100
|
|||
parsers = ["diff", "result-detail"]
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
result-detail.error = true
|
||||
result-detail.stderr = true
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -252,58 +255,95 @@ release.deadline = 2024-10-12 23:59:00+08:00
|
|||
release.stages = [ "compile" ]
|
||||
|
||||
[compile]
|
||||
name = "Compilation"
|
||||
command = "make.sh" # eg. script running cmake commands
|
||||
files.import = [ "src/main.c", "src/task.h", "srcCMakelist.txt" ] #
|
||||
files.export = [ "p1", "p1-msan" ]
|
||||
# limit.cpu = 300 # allow 300s for complex/long compilation
|
||||
files.import = [ "tools/make.sh", "src/main.c", "src/task.h", "srcCMakelist.txt" ]
|
||||
files.export = [ "driver", "p2", "p2-msan" ]
|
||||
limit.cpu = 180 # p2 takes long to compile
|
||||
limit.stderr = 128
|
||||
|
||||
# parsers
|
||||
# compile parsers
|
||||
parsers = [ "result-detail", "result-status" ]
|
||||
result-status.comment = "Congratulations! Your code compiled successfully."
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-details.status = true
|
||||
result-details.stderr = true
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stderr = true
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
|
||||
[filelength]
|
||||
name = "File length check"
|
||||
command = "file-length" # command to run
|
||||
tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
|
||||
weights = [ 50, 20 ] # weight of each keyword
|
||||
parsers
|
||||
command = "./file-length 500 400 *.c *.h" # command to run
|
||||
files.import = [ "tools/file-length" ]
|
||||
|
||||
parsers = [ "keyword", "dummy", "result-detail" ]
|
||||
keyword.keyword = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
|
||||
keyword.weight = [ 50, 20 ] # weight of each keyword
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stderr = true
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
|
||||
[clangtidy]
|
||||
name = "Clang-tidy checks"
|
||||
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
|
||||
tests = [ "codequality-no-global-variables", "codequality-no-header-guard", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc performance" ]
|
||||
weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
|
||||
limit.stdout = 65
|
||||
|
||||
parsers = [ "clangtidy", "dummy", "result-detail" ]
|
||||
clangtiy.keyword = [ "codequality-no-global-variables", "codequality-no-header-guard", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc performance" ]
|
||||
clangtidy.weight = [10, 10, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stdout = true
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
|
||||
[cppcheck]
|
||||
name = "Cppcheck check"
|
||||
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --quiet ./"
|
||||
tests = ["error", "warning", "portability", "performance", "style"]
|
||||
weights = [20, 10, 15, 15, 10]
|
||||
limit.stderr = 65
|
||||
|
||||
parsers = [ "cppcheck", "dummy", "result-detail" ]
|
||||
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
|
||||
cppcheck.weight = [20, 10, 15, 15, 10]
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stderr = true
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
|
||||
[cpplint]
|
||||
name = "Cpplint check"
|
||||
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-readability/todo,-build/include_subdir,-build/header_guard --recursive --exclude=build ."
|
||||
tests = [ "runtime", "readability", "build" ]
|
||||
weights = [ 10, 20, 15]
|
||||
limit.stdout = 65
|
||||
|
||||
parsers = [ "cpplint", "dummy", "result-detail" ]
|
||||
cpplint.keyword = [ "runtime", "readability", "build" ]
|
||||
cpplint.weight = [ 10, 20, 15]
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stdout = true
|
||||
result-detail.time = false
|
||||
result-detail.mem = false
|
||||
|
||||
[judge-base]
|
||||
command="./driver ./mumsh"
|
||||
limit.cpu = 10 # default cpu limit (in sec) for each test case
|
||||
limit.mem = 50 # set default mem limit (in MB) for all OJ test cases
|
||||
score = 10 # default OJ score for each test case
|
||||
parsers = ["diff", "stderr"]
|
||||
size.diff = 4
|
||||
size.stderr = 4
|
||||
diff.ignorespaces = true
|
||||
limit.cpu = 3
|
||||
limit.mem = 75
|
||||
score = 10
|
||||
|
||||
parsers = ["diff", "dummy", "result-detail"]
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stderr = true
|
||||
|
||||
case4.score = 15
|
||||
case4.limit.cpu = 30
|
||||
case4.limit.mem = 10
|
||||
case4.limit.stdout = 8
|
||||
|
||||
case5.score = 25
|
||||
|
||||
case6.score = 25
|
||||
case6.size.diff = 64
|
||||
|
||||
case8.size.stderr = 128
|
||||
|
||||
[judge-msan]
|
||||
|
@ -311,18 +351,18 @@ command="./driver ./mumsh-msan"
|
|||
limit.cpu = 10 # default cpu limit (in sec) for each test case
|
||||
limit.mem = 500 # set default mem limit (in MB) for all OJ test cases
|
||||
score = 10
|
||||
parsers = ["diff"]
|
||||
skip = ["case0", "case11"]
|
||||
diff.ignorespaces = false
|
||||
|
||||
parsers = ["diff", "dummy", "result-detail"]
|
||||
dummy.comment = "\n\n### Details\n"
|
||||
result-detail.exitstatus = true
|
||||
result-detail.stderr = true
|
||||
|
||||
case4.score = 15
|
||||
case4.limit.cpu = 30
|
||||
case4.limit.mem = 10
|
||||
|
||||
case5.score = 25
|
||||
|
||||
case6.score = 25
|
||||
case6.size.stderr = 32
|
||||
case5.diff.ignorespaces = false
|
||||
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user