-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 现场赛 | ||
|
||
## 将新的测例打包进测试镜像 | ||
|
||
现场赛添加了新的题目,需要将对应测试用例打包进测试镜像当中运行,因此需要重新编译测试用例。 | ||
|
||
将现场赛的测例的源代码复制到测试镜像源代码的根目录,然后在其 Makefile 文件中加上测例的目标即可。 | ||
|
||
需要额外注意的是,`splice-test` 编译出来会有好几个文件,需要全部 cp 进 `sdcard` 进行打包。 | ||
|
||
编译镜像可以使用赛方提供的 docker 进行编译。 | ||
|
||
## docker 国内访问问题 | ||
|
||
赛方提供了一个 docker 镜像,里面有对应的编译环境来编译测试用例并打包成镜像。直接在赛方提供的镜像源码根目录下运行指令: | ||
|
||
```sh | ||
docker run --rm -it -v $(pwd):/code --privileged --entrypoint make alphamj/os-contest:v7.8 -C /code sdcard | ||
``` | ||
|
||
但是由于前段时间国内将 dockerhub 给墙了,因此无法直接拉取 docker 镜像,因此需要使用代理。在镜像前面添加上代理的网址(这里使用 `dockerproxy.cn`)即可: | ||
|
||
```bash | ||
docker run --rm -it -v $(pwd):/code --privileged --entrypoint make dockerproxy.cn/alphamj/os-contest:v7.8 -C /code sdcard | ||
``` |