Skip to content
This repository was archived by the owner on Nov 8, 2020. It is now read-only.

Commit 5c240d5

Browse files
committed
rename
1 parent 2cbf379 commit 5c240d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+114
-148
lines changed

.github/upload.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/docker.yml

+23-19
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,21 @@ jobs:
4444
yarn run webpack
4545
yarn run build
4646
node .github/upload.js
47+
cp module/judge.hydro file.zip
48+
curl https://vijos.org/d/hydro/p/1001/upload -F "file=file.zip" -H "cookie: $cookie"
4749
env:
4850
upload_username: ${{ SECRETS.VIJOS_USERNAME }}
4951
upload_password: $${ SECRETS.VIJOS_PASSWORD }}
52+
upload_id: 1000
53+
upload_filename: judge.hydro
5054
- uses: actions/upload-artifact@v1
5155
with:
52-
name: judger.js
53-
path: dist/judger.js
56+
name: judge.js
57+
path: dist/judge.js
5458
- uses: actions/upload-artifact@v1
5559
with:
56-
name: judger.hydro
57-
path: module/judger.hydro
60+
name: judge.hydro
61+
path: module/judge.hydro
5862
- uses: actions/upload-artifact@v1
5963
with:
6064
name: entrypoint.js
@@ -70,28 +74,28 @@ jobs:
7074
node_version: '13.x'
7175
- uses: actions/download-artifact@v1
7276
with:
73-
name: judger.js
77+
name: judge.js
7478
- uses: actions/download-artifact@v1
7579
with:
7680
name: ExecutorServer
7781
- run: |
7882
mv ExecutorServer/executorserver .
79-
mv judger.js __judger
80-
mv __judger/judger.js .
83+
mv judge.js __judge
84+
mv __judge/judge.js .
8185
yarn add pkg -D
8286
yarn run pack
8387
- uses: actions/upload-artifact@v1
8488
with:
85-
name: Judger_linux_amd64
86-
path: hydrojudger-linux
89+
name: Judge_linux_amd64
90+
path: hydrojudge-linux
8791
- uses: actions/upload-artifact@v1
8892
with:
89-
name: Judger_macos_amd64
90-
path: hydrojudger-macos
93+
name: Judge_macos_amd64
94+
path: hydrojudge-macos
9195
- uses: actions/upload-artifact@v1
9296
with:
93-
name: Judger_win_amd64.exe
94-
path: hydrojudger-win.exe
97+
name: Judge_win_amd64.exe
98+
path: hydrojudge-win.exe
9599
latest:
96100
name: BuildLatest
97101
runs-on: ubuntu-latest
@@ -100,10 +104,10 @@ jobs:
100104
- uses: actions/checkout@v2
101105
- uses: actions/download-artifact@v1
102106
with:
103-
name: Judger_linux_amd64
107+
name: Judge_linux_amd64
104108
- uses: elgohr/Publish-Docker-Github-Action@master
105109
with:
106-
name: hydrooj/judger:latest
110+
name: hydrooj/judge:latest
107111
username: ${{ secrets.DOCKER_USERNAME }}
108112
password: ${{ secrets.DOCKER_PASSWORD }}
109113
dockerfile: Dockerfile/Dockerfile
@@ -115,13 +119,13 @@ jobs:
115119
- uses: actions/checkout@v2
116120
- uses: actions/download-artifact@v1
117121
with:
118-
name: judger.js
122+
name: judge.js
119123
- uses: actions/download-artifact@v1
120124
with:
121125
name: ExecutorServer
122126
- uses: elgohr/Publish-Docker-Github-Action@master
123127
with:
124-
name: hydrooj/judger:alpine
128+
name: hydrooj/judge:alpine
125129
username: ${{ secrets.DOCKER_USERNAME }}
126130
password: ${{ secrets.DOCKER_PASSWORD }}
127131
dockerfile: Dockerfile/alpine.Dockerfile
@@ -133,7 +137,7 @@ jobs:
133137
- uses: actions/checkout@v2
134138
- uses: elgohr/Publish-Docker-Github-Action@master
135139
with:
136-
name: hydrooj/judger:slim
140+
name: hydrooj/judge:slim
137141
username: ${{ secrets.DOCKER_USERNAME }}
138142
password: ${{ secrets.DOCKER_PASSWORD }}
139143
dockerfile: Dockerfile/slim.Dockerfile
@@ -145,7 +149,7 @@ jobs:
145149
- uses: actions/checkout@v2
146150
- uses: elgohr/Publish-Docker-Github-Action@master
147151
with:
148-
name: hydrooj/judger:default
152+
name: hydrooj/judge:default
149153
username: ${{ secrets.DOCKER_USERNAME }}
150154
password: ${{ secrets.DOCKER_PASSWORD }}
151155
dockerfile: Dockerfile/default.Dockerfile

Dockerfile/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
FROM debian:stretch
22
WORKDIR /app
3-
COPY Judger_linux_amd64 /app/
3+
COPY Judge_linux_amd64 /app/
44
RUN apt-get update && \
55
apt-get install -y unzip curl wget && \
66
mkdir /config /cache && \
7-
chmod +x /app/hydrojudger-linux && \
8-
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudger/master/examples/langs.yaml >/config/langs.yaml
7+
chmod +x /app/hydrojudge-linux && \
8+
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudge/master/examples/langs.yaml >/config/langs.yaml
99
VOLUME [ "/config", "/cache"]
1010
ENV CONFIG_FILE=/config/config.yaml LANGS_FILE=/config/langs.yaml CACHE_DIR=/cache FILES_DIR=/files
11-
CMD "/app/hydrojudger-linux"
11+
CMD "/app/hydrojudge-linux"

Dockerfile/alpine.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM mhart/alpine-node:slim-10
22
WORKDIR /app
3-
COPY judger.js ExecutorServer /app/
3+
COPY judge.js ExecutorServer /app/
44
RUN apk update && \
55
apk add unzip curl wget libc6-compat && \
66
mkdir /config /cache && \
77
chmod +x executorserver && \
8-
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudger/master/examples/langs.yaml >/config/langs.yaml && \
8+
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudge/master/examples/langs.yaml >/config/langs.yaml && \
99
rm -rf /var/cache/apk/*
1010
VOLUME [ "/config", "/cache" ]
1111
ENV CONFIG_FILE=/config/config.yaml LANGS_FILE=/config/langs.yaml CACHE_DIR=/cache FILES_DIR=/files
1212
ENV START_EXECUTOR_SERVER=/app/executorserver EXECUTOR_SERVER_ARGS="--silent"
13-
CMD ["node", "judger.js"]
13+
CMD ["node", "judge.js"]

Dockerfile/default.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM hydrooj/judger:latest
1+
FROM hydrooj/judge:latest
22
RUN apt-get update && \
33
apt-get install -y \
44
gcc g++ rustc \

Dockerfile/slim.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM hydrooj/judger:alpine
1+
FROM hydrooj/judge:alpine
22
ENV FPC_VERSION="3.0.4" \
33
FPC_ARCH="x86_64-linux"
44

55
RUN apk add gcc g++ && \
6-
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudger/master/examples/langs.slim.yaml >/config/langs.yaml && \
6+
curl -sSL https://raw.githubusercontent.com/hydro-dev/HydroJudge/master/examples/langs.slim.yaml >/config/langs.yaml && \
77
apk add --no-cache binutils && \
88
cd /tmp && \
99
wget "ftp://ftp.hu.freepascal.org/pub/fpc/dist/${FPC_VERSION}/${FPC_ARCH}/fpc-${FPC_VERSION}.${FPC_ARCH}.tar" -O fpc.tar && \

README.md

+9-39
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[English](docs/en/README.md)
44

55
## 介绍
6-
HydroJudger 是一个用于信息学算法竞赛的高效评测后端。
7-
和之前的版本相比,HydroJudger 支持了自定义比较器、子任务、交互器等多种新特性。
6+
HydroJudge 是一个用于信息学算法竞赛的高效评测后端。
7+
和之前的版本相比,HydroJudge 支持了自定义比较器、子任务、交互器等多种新特性。
88

99

1010
## 帮助中心
@@ -13,36 +13,6 @@ HydroJudger 是一个用于信息学算法竞赛的高效评测后端。
1313

1414
## 安装与使用
1515

16-
### 直接运行可执行文件
17-
### Run packed executable file (suggested)
18-
19-
1.[GithubActions](https://github.com/hydro-dev/HydroJudger/actions) 下载自动打包的可执行文件。
20-
根据您使用的操作系统选择下面三者中的一个:
21-
22-
- Judger_win_amd64.exe
23-
- Judger_linux_amd64
24-
- Judger_macos_amd64
25-
26-
2. 创建配置文件
27-
28-
`$HOME` 为用户目录,在linux下通常为`/root``/home/用户名`,在Windows下通常为`C:\Users\用户名`
29-
30-
```yaml
31-
#$HOME/.config/hydro/judger.yaml
32-
hosts:
33-
localhost:
34-
server_url: e.g. https://vijos.org
35-
uname: Judge account username
36-
password: Judge account password
37-
```
38-
39-
3. 运行
40-
41-
```sh
42-
chmod +x ./Judger
43-
./Judger
44-
```
45-
4616
### 使用docker部署
4717

4818
创建 `config.yaml`,文件如下所示
@@ -56,15 +26,15 @@ hosts:
5626
password: 填写密码
5727
```
5828
59-
之后使用 `docker run -d --privileged -v /path/to/config.yaml:/config/config.yaml hydrooj/judger:default` 即可启动。
29+
之后使用 `docker run -d --privileged -v /path/to/config.yaml:/config/config.yaml hydrooj/judge:default` 即可启动。
6030
**将 /path/to/config.yaml 替换为您创建的文件的绝对路径!**
6131

6232
提示:为docker预构建了四个版本的镜像:
6333

64-
- `hydrooj/judger:alpine` 基于AlpineLinux构建的最精简镜像
65-
- `hydrooj/judger:latest` 未安装任何编译器,需手动安装
66-
- `hydrooj/judger:default` Vijos默认语言的编译器支持
67-
- `hydrooj/judger:slim` 基于AlpineLinux,预装了 C C++ Pascal 语言支持
34+
- `hydrooj/judge:alpine` 基于AlpineLinux构建的最精简镜像
35+
- `hydrooj/judge:latest` 未安装任何编译器,需手动安装
36+
- `hydrooj/judge:default` Vijos默认语言的编译器支持
37+
- `hydrooj/judge:slim` 基于AlpineLinux,预装了 C C++ Pascal 语言支持
6838

6939
### 手动安装
7040

@@ -80,12 +50,12 @@ npm install -g yarn # 如果已经安装yarn请跳过该步骤
8050
yarn
8151
```
8252

83-
创建设置目录 `~/.config/hydro` ,并放置 `judger.yaml` ,配置文件格式详见 [examples/judger.yaml](examples/judger.yaml)
53+
创建设置目录 `~/.config/hydro` ,并放置 `judge.yaml` ,配置文件格式详见 [examples/judge.yaml](examples/judge.yaml)
8454
启动 [go-sandbox](https://github.com/criyle/go-judge),监听端口5050。
8555
您应当以 root 身份运行。
8656

8757
```sh
88-
node judger/daemon.js
58+
node judge/daemon.js
8959
```
9060

9161
## 设置

docs/en/README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
## Introduction
66

7-
HydroJudger is a judging daemon for programming contests like OI and ACM.
8-
HydroJudger supports custom judge, subtask and other many new features.
7+
HydroJudge is a judging daemon for programming contests like OI and ACM.
8+
HydroJudge supports custom judge, subtask and other many new features.
99

1010
## Help Center
1111

@@ -15,17 +15,17 @@ HydroJudger supports custom judge, subtask and other many new features.
1515

1616
### Run packed executable file (suggested)
1717

18-
Step 1: Download the latest packed files at [GithubActions](https://github.com/hydro-dev/HydroJudger/actions)
18+
Step 1: Download the latest packed files at [GithubActions](https://github.com/hydro-dev/HydroJudge/actions)
1919
You should download one of the files below:
2020

21-
- Judger_win_amd64.exe
22-
- Judger_linux_amd64
23-
- Judger_macos_amd64
21+
- Judge_win_amd64.exe
22+
- Judge_linux_amd64
23+
- Judge_macos_amd64
2424

2525
Step 2: Create configuration file
2626

2727
```yaml
28-
#$HOME/.config/hydro/judger.yaml
28+
#$HOME/.config/hydro/judge.yaml
2929
hosts:
3030
localhost:
3131
server_url: e.g. https://vijos.org
@@ -36,8 +36,8 @@ hosts:
3636
Step 3: Run!
3737
3838
```sh
39-
chmod +x ./Judger
40-
./Judger
39+
chmod +x ./Judge
40+
./Judge
4141
```
4242

4343
### Run with docker
@@ -52,14 +52,14 @@ hosts:
5252
password: Judge account password
5353
```
5454
55-
Then use `docker run --privileged -d -v /path/to/config.yaml:/config/config.yaml hydrooj/judger:default` to start.
56-
**Replace /path/to/judger.yaml with your ABSOLUTE PATH!**
55+
Then use `docker run --privileged -d -v /path/to/config.yaml:/config/config.yaml hydrooj/judge:default` to start.
56+
**Replace /path/to/judge.yaml with your ABSOLUTE PATH!**
5757
Hint: there are 4 tags built for docker:
5858

59-
- `hydrooj/judger:alpine` Smallest image based on AlpineLinux
60-
- `hydrooj/judger:latest` No compiler installed
61-
- `hydrooj/judger:default` Default compiler for vijos
62-
- `hydrooj/judger:slim` C C++ Pascal
59+
- `hydrooj/judge:alpine` Smallest image based on AlpineLinux
60+
- `hydrooj/judge:latest` No compiler installed
61+
- `hydrooj/judge:default` Default compiler for vijos
62+
- `hydrooj/judge:slim` C C++ Pascal
6363

6464
## Configuration
6565

@@ -83,16 +83,16 @@ Use the following command to install nodejs requirements:
8383
yarn
8484
```
8585

86-
Put `judger.yaml` and `langs.yaml` in the configuration directory, usually
87-
in `$HOME/.config/hydro/`. `judger.yaml` includes the server address, user and
86+
Put `judge.yaml` and `langs.yaml` in the configuration directory, usually
87+
in `$HOME/.config/hydro/`. `judge.yaml` includes the server address, user and
8888
password and `langs.yaml` includes the compiler options. Examples can be found
8989
under the `examples` directory.
9090

9191
Run the [executor-server](https://github.com/criyle/go-judge) first,
9292
And use the following command to run the daemon:
9393

9494
```sh
95-
node judger/daemon.js
95+
node judge/daemon.js
9696
```
9797

9898
## Testdata format

docs/en/Testdata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Testdata.zip
1919
+- output2.out
2020
```
2121

22-
Judger will use `1s, 256MB` limit as default.
22+
Judge will use `1s, 256MB` limit as default.
2323
Filename should be as below:
2424

2525
Input files: `([a-zA-Z0-9]*[0-9]+.in)|(input[0-9]+.txt)`

examples/testdata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ judge_extra_files:
5555
- extra_file.txt #
5656

5757
# Test Cases 测试数据列表
58-
# If neither CASES or SUBTASKS are set(or config.yaml doesn't exist), judger will try to locate them automaticly.
58+
# If neither CASES or SUBTASKS are set(or config.yaml doesn't exist), judge will try to locate them automaticly.
5959
# 如果 CASES 和 SUBTASKS 都没有设置或 config.yaml 不存在, 系统会自动尝试识别数据点。
6060
# We support these names for auto mode: 自动识别支持以下命名方式:
6161
# 1. [name(optional)][number].(in/out/ans) RegExp: /^([a-zA-Z]*)([0-9]+).in$/
File renamed without changes.

judger/case/conf.js judge/case/conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = async function readConfCases(folder, filename, { next }) {
2323
const i = line.split(' ');
2424
map[i[0]] = i[1]; // eslint-disable-line prefer-destructuring
2525
}
26-
assert(map.use_builtin_judger);
26+
assert(map.use_builtin_judge);
2727
assert(map.use_builtin_checker);
2828
assert(map.n_tests);
2929
assert(map.n_ex_tests);
File renamed without changes.
File renamed without changes.

judger/cases.js judge/cases.js

File renamed without changes.

judger/check.js judge/check.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

judger/compile.js judge/compile.js

File renamed without changes.

judger/config.js judge/config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const { mkdirp } = require('./utils');
77
const log = require('./log');
88

99
const config = {
10-
CONFIG_FILE: path.resolve(os.homedir(), '.config', 'hydro', 'judger.yaml'),
10+
CONFIG_FILE: path.resolve(os.homedir(), '.config', 'hydro', 'judge.yaml'),
1111
LANGS_FILE: path.resolve(os.homedir(), '.config', 'hydro', 'langs.yaml'),
12-
CACHE_DIR: path.resolve(os.homedir(), '.cache', 'hydro', 'judger'),
13-
FILES_DIR: path.resolve(os.homedir(), '.cache', 'hydro', 'files', 'judger'),
12+
CACHE_DIR: path.resolve(os.homedir(), '.cache', 'hydro', 'judge'),
13+
FILES_DIR: path.resolve(os.homedir(), '.cache', 'hydro', 'files', 'judge'),
1414
SYSTEM_MEMORY_LIMIT_MB: 1024,
1515
SYSTEM_TIME_LIMIT_MS: 16000,
1616
SYSTEM_PROCESS_LIMIT: 32,
1717
RETRY_DELAY_SEC: 15,
18-
TEMP_DIR: path.resolve(os.tmpdir(), 'hydro', 'judger'),
18+
TEMP_DIR: path.resolve(os.tmpdir(), 'hydro', 'judge'),
1919
EXECUTION_HOST: 'http://localhost:5050',
2020
CONFIG: null,
2121
LANGS: null,

judger/daemon.js judge/daemon.js

File renamed without changes.
File renamed without changes.
File renamed without changes.

judger/error.js judge/error.js

File renamed without changes.

0 commit comments

Comments
 (0)