File tree Expand file tree Collapse file tree 5 files changed +23
-13
lines changed Expand file tree Collapse file tree 5 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ jobs:
56
56
- name : Mirror + trigger CI
57
57
uses : tkf2019/gitlab-mirror-and-ci-action@master
58
58
with :
59
- args : " https://git.tsinghua.edu.cn/os-lab/2024s/public/rcore-tutorial-code"
59
+ args : " https://git.tsinghua.edu.cn/os-lab/2024s/public/rcore-tutorial-code-2024s "
60
60
env :
61
61
GITLAB_HOSTNAME : " git.tsinghua.edu.cn"
62
62
GITLAB_PROJECT_ID : " 29091"
63
- GITLAB_PROJECT_NAME : " rcore-tutorial-code"
63
+ GITLAB_PROJECT_NAME : " rcore-tutorial-code-2024s "
64
64
GITLAB_PROJECT_TOKEN : ${{secrets.GITLAB_PROJECT_TOKEN}}
65
65
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
66
66
deploy :
Original file line number Diff line number Diff line change 7
7
test-code-job :
8
8
stage : test
9
9
script :
10
- - git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2024S.git ci-user
11
- - git clone https://github.com/LearningOS/rCore-Tutorial-Test-2024S.git ci-user/user
12
- - cd ci-user && make test CHAPTER=`echo $CI_COMMIT_REF_NAME | grep -oP 'ch\K[0-9]'` passwd=$BASE_TEST_TOKEN
10
+ - git clone https://token:${RCORE_CHECKER_REPO_READ_TOKEN_2024S}@git.tsinghua.edu.cn/os-lab/2024s/ta/rcore-tutorial-checker-2024s.git ci-user
11
+ - git clone https://token:${RCORE_TEST_REPO_READ_TOKEN_2024S}@git.tsinghua.edu.cn/os-lab/2024s/public/rcore-tutorial-test-2024s.git ci-user/user
12
+ - cp -r $HOME/os-vendor os/vendor
13
+ - cp -r $HOME/user-vendor ci-user/user/vendor
14
+ - cd ci-user && make test CHAPTER=`echo $CI_COMMIT_REF_NAME | grep -oP 'ch\K[0-9]'` passwd=$BASE_TEST_TOKEN OFFLINE=1
Original file line number Diff line number Diff line change @@ -73,13 +73,18 @@ RUN rustup --version && \
73
73
cargo --version && \
74
74
rustc --version
75
75
76
- # 3. Build env for labs
77
- # See os1/Makefile `env:` for example.
78
- # This avoids having to wait for these steps each time using a new container.
79
- RUN rustup target add riscv64gc-unknown-none-elf && \
80
- cargo install cargo-binutils --vers ~0.2 && \
81
- rustup component add rust-src && \
82
- rustup component add llvm-tools-preview
76
+ # 2.3 Env
77
+ RUN cargo install cargo-binutils; \
78
+ rustup target add riscv64gc-unknown-none-elf; \
79
+ rustup component add rust-src; \
80
+ rustup component add llvm-tools-preview; \
81
+ rustup component add rustfmt; \
82
+ rustup component add clippy;
83
+
84
+ # 3. Cargo vendor
85
+ WORKDIR ${HOME}
86
+ COPY os/vendor ./os-vendor
87
+ COPY user/vendor ./user-vendor
83
88
84
89
# Ready to go
85
90
WORKDIR ${HOME}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ bitflags = "1.2.1"
11
11
buddy_system_allocator = " 0.6"
12
12
lazy_static = { version = " 1.4.0" , features = [" spin_no_std" ] }
13
13
log = " 0.4"
14
- riscv = { git = " https://gitee .com/rcore-os/riscv" , features = [" inline-asm" ] }
14
+ riscv = { git = " https://github .com/rcore-os/riscv" , features = [" inline-asm" ] }
15
15
xmas-elf = " 0.7.0"
16
16
virtio-drivers = { git = " https://github.com/rcore-os/virtio-drivers" , rev = " 4ee80e5" }
17
17
easy-fs = { path = " ../easy-fs" }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ KERNEL_BIN := $(KERNEL_ELF).bin
6
6
DISASM_TMP := target/$(TARGET ) /$(MODE ) /asm
7
7
FS_IMG := ../user/target/$(TARGET ) /$(MODE ) /fs.img
8
8
APPS := ../user/src/bin/*
9
+ OFFLINE :=
9
10
10
11
# BOARD
11
12
BOARD := qemu
@@ -37,10 +38,12 @@ TEST ?=
37
38
build : env $(KERNEL_BIN ) fs-img
38
39
39
40
env :
41
+ ifeq ($(OFFLINE ) ,)
40
42
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
41
43
cargo install cargo-binutils
42
44
rustup component add rust-src
43
45
rustup component add llvm-tools-preview
46
+ endif
44
47
45
48
$(KERNEL_BIN ) : kernel
46
49
@$(OBJCOPY ) $(KERNEL_ELF ) --strip-all -O binary $@
You can’t perform that action at this time.
0 commit comments