Merge branch 'QingdaoU:master' into patch-1

This commit is contained in:
Rutwik Patel 2021-11-17 13:11:06 +05:30 committed by GitHub
commit be40a184b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 4 deletions

View File

@ -1,5 +1,15 @@
{
"update": [
{
"version": "2021-09-28",
"level": "Recommend",
"title": "2021-09-28",
"details": [
"修复 Golang 编译运行的一些问题",
"支持 JavaScript 语言,注意,升级后需要按照 <a href='https://opensource.qduoj.com/#/onlinejudge/guide/update_compile_options'>文档</a>来 reset_languages如果有自定义配置将会被重置需要先备份。",
"增加了一些语言的编辑器语法高亮配置"
]
},
{
"version": "2021-08-07",
"level": "Recommend",

View File

@ -189,13 +189,40 @@ _go_lang_config = {
"max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024,
"compile_command": "/usr/bin/go build -o {exe_path} {src_path}",
"env": ["GOCACHE=/tmp", "GOPATH=/tmp"]
"env": ["GOCACHE=/tmp", "GOPATH=/tmp", "GOMAXPROCS=1"] + default_env
},
"run": {
"command": "{exe_path}",
"seccomp_rule": "",
"seccomp_rule": "golang",
# 降低内存占用
"env": ["GODEBUG=madvdontneed=1"] + default_env,
"env": ["GODEBUG=madvdontneed=1", "GOMAXPROCS=1"] + default_env,
"memory_limit_check_only": 1
}
}
_node_lang_config = {
"template": """//PREPEND BEGIN
//PREPEND END
//TEMPLATE BEGIN
//TEMPLATE END
//APPEND BEGIN
//APPEND END""",
"compile": {
"src_name": "main.js",
"exe_name": "main.js",
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024,
"compile_command": "/usr/bin/node --check {src_path}",
"env": default_env
},
"run": {
"command": "/usr/bin/node {exe_path}",
"seccomp_rule": "node",
# 降低内存占用
"env": default_env,
"memory_limit_check_only": 1
}
}
@ -208,5 +235,6 @@ languages = [
{"config": _java_lang_config, "name": "Java", "description": "OpenJDK 11", "content_type": "text/x-java"},
{"config": _py2_lang_config, "name": "Python2", "description": "Python 2.7", "content_type": "text/x-python"},
{"config": _py3_lang_config, "name": "Python3", "description": "Python 3.6", "content_type": "text/x-python"},
{"config": _go_lang_config, "name": "Golang", "description": "Golang 1.15", "content_type": "text/x-go"},
{"config": _go_lang_config, "name": "Golang", "description": "Golang 1.17", "content_type": "text/x-go"},
{"config": _node_lang_config, "name": "JavaScript", "description": "Node 14", "content_type": "text/javascript"},
]