feat: init

This commit is contained in:
张泊明518370910136 2024-04-03 18:27:07 -04:00
commit 21f6df70d4
GPG Key ID: D47306D7062CDA9D
7 changed files with 71 additions and 0 deletions

6
a.cc Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main() {
int a, b;
std::cin >> a >> b;
std::cout << a + b << '\n';
}

1
cases/1.in Normal file
View File

@ -0,0 +1 @@
1 1

1
cases/1.out Normal file
View File

@ -0,0 +1 @@
2

1
cases/2.in Normal file
View File

@ -0,0 +1 @@
1024 2048

1
cases/2.out Normal file
View File

@ -0,0 +1 @@
3072

60
conf.toml Normal file
View File

@ -0,0 +1,60 @@
skipGitea = true
[[stages]]
name = "compile"
[stages.executor]
name = "sandbox"
[stages.executor.with.default]
args = ["g++", "a.cc", "-o", "a"]
env = ["PATH=/usr/bin:/bin"]
cpuLimit = 10_000_000_000
memoryLimit = 104_857_600
procLimit = 50
copyInCwd = true
copyOut = ["stdout", "stderr"]
copyOutCached = ["a"]
[stages.executor.with.default.stdin]
content = ""
[stages.executor.with.default.stdout]
name = "stdout"
max = 4_096
[stages.executor.with.default.stderr]
name = "stderr"
max = 4_096
[stages.parser]
name = "result-status"
[stages.parser.with]
score = 100
comment = "compile done"
[[stages]]
name = "run"
[stages.executor]
name = "sandbox"
[stages.executor.with.default]
args = ["./a"]
env = ["PATH=/usr/bin:/bin"]
cpuLimit = 1_000_000_000
memoryLimit = 104_857_600
procLimit = 50
copyOut = ["stdout", "stderr"]
[stages.executor.with.default.stdout]
name = "stdout"
max = 4_096
[stages.executor.with.default.stderr]
name = "stderr"
max = 4_096
[stages.executor.with.default.copyInCached]
a = "a"
[[stages.executor.with.cases]]
[stages.executor.with.cases.stdin]
src = "./cases/1.in"
[[stages.executor.with.cases]]
[stages.executor.with.cases.stdin]
src = "./cases/2.in"
[stages.parser]
name = "diff"
[[stages.parser.with.cases]]
score = 100
stdoutPath = "./cases/1.out"
[[stages.parser.with.cases]]
score = 100
stdoutPath = "./cases/2.out"

1
expected_regex.json Normal file
View File

@ -0,0 +1 @@
[{"name":"compile","results":[{"score":0,"comment":""}]},{"name":"run","results":[{"score":100,"comment":"executor status: run time: \\d+ ns, memory: \\d+ bytes"},{"score":100,"comment":"executor status: run time: \\d+ ns, memory: \\d+ bytes"}]}]