From 72dc7711f4d08d392253ed1f5ec0866686614a70 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 2 Oct 2024 20:55:13 +0800 Subject: [PATCH] Update JOJ3 Configuration Schema --- JOJ3-Configuration-Schema.md | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/JOJ3-Configuration-Schema.md b/JOJ3-Configuration-Schema.md index 307311f..ac8fe4e 100644 --- a/JOJ3-Configuration-Schema.md +++ b/JOJ3-Configuration-Schema.md @@ -22,6 +22,18 @@ Health check configuration: **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 Basic idea: @@ -36,16 +48,16 @@ Basic idea: - test cases can be individually configured if necessary ```toml -stages = [ "compile", "code_quality", "joj" ] +stages = [ "compile", "code_quality", "joj" ] # list of stages, can feature a unique stage [compile] -command = "cmake" -copyfiles= [ "main.c", "task.h" ] +command = "cmake" +copyfiles= [ "main.c", "task.h" ] # files to include with repo code when compiling [[code_quality]] -command = "file-length" -tests = [ "max", "recommend"] -weights = [ 50, 20 ] +command = "file-length" # command to run +tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin +weights = [ 50, 20 ] # weight of each keyword [[code_quality]] 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] [joj] -score = 10 -limit.cpu = 10000000000 -limit.mem = 536870912 +score = 10 # default JOJ score for each test case +limit.cpu = 10000000000 # default cpu limit for each test case +limit.mem = 536870912 # default mem limit for each test case [[test_cases]] -name = "case4" -score = 20 +name = "case4" # name of a test case with non-default setup +score = 20 # non-default score limit.cpu = 5000000000 limit.mem = 53687091 [[test_cases]] name = "case10" score = 30 -limit.mem = 53687091 +limit.mem = 53687091 # limit.cpu is kept as default ```