chore: update runner env
This commit is contained in:
parent
05b3d948c2
commit
2b84f94abb
2
.github/workflows/container.yml
vendored
2
.github/workflows/container.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/.local/share/containers
|
~/.local/share/containers
|
||||||
~/.config/containers
|
~/.config/containers
|
||||||
key: ${{ runner.os }}
|
key: ${{ runner.os }}-${{ hashFiles('**/*.Dockerfile', 'build_image.sh', 'VERSION') }}
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: redhat-actions/podman-login@v1
|
uses: redhat-actions/podman-login@v1
|
||||||
with:
|
with:
|
||||||
|
3
resource/runner/framework/rootfs/.gitignore
vendored
3
resource/runner/framework/rootfs/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/full
|
/full
|
||||||
/run
|
/run
|
||||||
|
*.tar
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
GO=/usr/local/go/bin/go
|
GO=/usr/bin/go
|
||||||
GO_BUILD_FLAGS=-trimpath
|
GO_BUILD_FLAGS=-trimpath
|
1
resource/runner/framework/template/nodejs.mk
Normal file
1
resource/runner/framework/template/nodejs.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
NODEJS=/usr/bin/node
|
@ -1,2 +1,2 @@
|
|||||||
RUSTC = /root/.cargo/bin/rustc
|
RUSTC = /usr/bin/rustc
|
||||||
RUSTFLAGS = -C opt-level=2 -W warnings
|
RUSTFLAGS = -C opt-level=2 -W warnings
|
@ -27,7 +27,7 @@
|
|||||||
"Lang" : "pypy3",
|
"Lang" : "pypy3",
|
||||||
"Judge" : {"Type": "default", "Script": "", "Cmp": "NCMP"},
|
"Judge" : {"Type": "default", "Script": "", "Cmp": "NCMP"},
|
||||||
"Runtime": {
|
"Runtime": {
|
||||||
"Run": {"TimeLimit": 1000, "MemoryLimit": 80, "NProcLimit": 1}
|
"Run": {"TimeLimit": 1000, "MemoryLimit": 70, "NProcLimit": 1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,7 @@ compile:
|
|||||||
judge:
|
judge:
|
||||||
# !! Rename on *.out.usr or *.judge is not allowed !!
|
# !! Rename on *.out.usr or *.judge is not allowed !!
|
||||||
# 自定义评测方式
|
# 自定义评测方式
|
||||||
sed '/gadgets/d' $(PREFIX)/user/$(TEST_NUM).out.usr >$(PREFIX)/user/$(TEST_NUM).out.usr1
|
# 特别注意:整个文件系统为 readonly filesystem,临时文件只能放在 /tmp 下
|
||||||
|
sed '/gadgets/d' $(PREFIX)/user/$(TEST_NUM).out.usr > /tmp/$(TEST_NUM).out.usr1
|
||||||
# 评测结果要求符合 testlib 的格式 -> $(TEST_NUM).judge
|
# 评测结果要求符合 testlib 的格式 -> $(TEST_NUM).judge
|
||||||
$(NCMP) $(PREFIX)/problem/data/input/$(TEST_NUM).input $(PREFIX)/user/$(TEST_NUM).out.usr1 $(PREFIX)/problem/data/output/$(TEST_NUM).output $(PREFIX)/user/$(TEST_NUM).judge -appes
|
$(NCMP) $(PREFIX)/problem/data/input/$(TEST_NUM).input /tmp/$(TEST_NUM).out.usr1 $(PREFIX)/problem/data/output/$(TEST_NUM).output $(PREFIX)/user/$(TEST_NUM).judge -appes
|
||||||
|
7
resource/runner/problem/example/std/ans.c
Normal file
7
resource/runner/problem/example/std/ans.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
int main() {
|
||||||
|
long long a, b;
|
||||||
|
scanf("%lld%lld", &a, &b);
|
||||||
|
printf("%lld\n", a + b);
|
||||||
|
return 0;
|
||||||
|
}
|
8
resource/runner/problem/example/std/ans.cpp
Normal file
8
resource/runner/problem/example/std/ans.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include<bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
int main() {
|
||||||
|
long long a, b;
|
||||||
|
cin >> a >> b;
|
||||||
|
cout << a + b << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
1
resource/runner/problem/example/std/ans.py
Normal file
1
resource/runner/problem/example/std/ans.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
print(sum(map(int, input().strip().split())))
|
15
resource/runner/problem/example/std/ans.rs
Normal file
15
resource/runner/problem/example/std/ans.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
use std::io;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut input = String::new();
|
||||||
|
io::stdin().read_line(&mut input).unwrap();
|
||||||
|
|
||||||
|
let nums: Vec<i32> = input
|
||||||
|
.trim()
|
||||||
|
.split_whitespace()
|
||||||
|
.map(|num| num.parse().unwrap())
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
let sum = nums[0] + nums[1];
|
||||||
|
println!("{}", sum);
|
||||||
|
}
|
@ -1,20 +1,15 @@
|
|||||||
FROM docker.io/library/debian:bookworm-slim
|
FROM docker.io/library/debian:bookworm-slim
|
||||||
WORKDIR /woj
|
WORKDIR /woj
|
||||||
|
|
||||||
# Install dependencies & languages: c/cpp/python3/pypy3
|
# RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y software-properties-common \
|
|
||||||
|
# Install dependencies & languages: c/cpp/python3/pypy3/go/rust/nodejs
|
||||||
|
RUN apt-get update && apt-get upgrade -y \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
git parallel wget curl \
|
git parallel wget curl \
|
||||||
autoconf bison cmake flex gperf libnl-route-3-dev libprotobuf-dev libtool m4 make pkg-config protobuf-compiler \
|
autoconf bison cmake flex gperf libnl-route-3-dev libprotobuf-dev libtool m4 make pkg-config protobuf-compiler \
|
||||||
gcc g++ clang \
|
gcc g++ clang python3 pypy3 golang-go rustc nodejs \
|
||||||
python3 pypy3 \
|
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists
|
&& apt-get clean && rm -rf /var/lib/apt/lists
|
||||||
# Install golang
|
|
||||||
RUN wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz && rm go1.22.1.linux-amd64.tar.gz
|
|
||||||
# Install Rust
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
||||||
# Setup PATH
|
|
||||||
ENV PATH=/usr/local/go/bin:/root/.cargo/bin:$PATH
|
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
RUN mkdir -p /woj/framework && mkdir -p /woj/problem
|
RUN mkdir -p /woj/framework && mkdir -p /woj/problem
|
||||||
|
Loading…
Reference in New Issue
Block a user