Update JOJ3 Configuration Schema
parent
641674189a
commit
72dc7711f4
|
|
@ -22,6 +22,18 @@ Health check configuration:
|
||||||
**Important:** it should never be possible to disable health check.
|
**Important:** it should never be possible to disable health check.
|
||||||
|
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[repo]
|
||||||
|
owners = ["mac-wang", "jon-lee", "allen_wr"] # teaching team
|
||||||
|
max_size = 5 # repo max size in MB
|
||||||
|
|
||||||
|
[files]
|
||||||
|
whitelist.patterns = ["*.cpp", "*.c", "*.m", "*.md", "Makefile", "CMakelist.txt", ".gitea"]
|
||||||
|
whitelist.file = "messenger.json" # IMPORTANT: only use if strictly necessary. Almost no course should use it
|
||||||
|
immutable.files = [".gitignore", ".gitattributes", ".gitea/workflows/push.yaml"] # readonly files
|
||||||
|
immutable.hash = ["fafssafds7","kjklhk5hk345", "nvnfjuysf653214"] # hash of readonly files
|
||||||
|
```
|
||||||
|
|
||||||
## Task level
|
## Task level
|
||||||
|
|
||||||
Basic idea:
|
Basic idea:
|
||||||
|
|
@ -36,16 +48,16 @@ Basic idea:
|
||||||
- test cases can be individually configured if necessary
|
- test cases can be individually configured if necessary
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
stages = [ "compile", "code_quality", "joj" ]
|
stages = [ "compile", "code_quality", "joj" ] # list of stages, can feature a unique stage
|
||||||
|
|
||||||
[compile]
|
[compile]
|
||||||
command = "cmake"
|
command = "cmake"
|
||||||
copyfiles= [ "main.c", "task.h" ]
|
copyfiles= [ "main.c", "task.h" ] # files to include with repo code when compiling
|
||||||
|
|
||||||
[[code_quality]]
|
[[code_quality]]
|
||||||
command = "file-length"
|
command = "file-length" # command to run
|
||||||
tests = [ "max", "recommend"]
|
tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
|
||||||
weights = [ 50, 20 ]
|
weights = [ 50, 20 ] # weight of each keyword
|
||||||
|
|
||||||
[[code_quality]]
|
[[code_quality]]
|
||||||
command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
|
command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
|
||||||
|
|
@ -63,18 +75,18 @@ tests = [ "runtime", "readability", "build" ]
|
||||||
weights = [ 10, 20, 15]
|
weights = [ 10, 20, 15]
|
||||||
|
|
||||||
[joj]
|
[joj]
|
||||||
score = 10
|
score = 10 # default JOJ score for each test case
|
||||||
limit.cpu = 10000000000
|
limit.cpu = 10000000000 # default cpu limit for each test case
|
||||||
limit.mem = 536870912
|
limit.mem = 536870912 # default mem limit for each test case
|
||||||
|
|
||||||
[[test_cases]]
|
[[test_cases]]
|
||||||
name = "case4"
|
name = "case4" # name of a test case with non-default setup
|
||||||
score = 20
|
score = 20 # non-default score
|
||||||
limit.cpu = 5000000000
|
limit.cpu = 5000000000
|
||||||
limit.mem = 53687091
|
limit.mem = 53687091
|
||||||
|
|
||||||
[[test_cases]]
|
[[test_cases]]
|
||||||
name = "case10"
|
name = "case10"
|
||||||
score = 30
|
score = 30
|
||||||
limit.mem = 53687091
|
limit.mem = 53687091 # limit.cpu is kept as default
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user