Skip to content

Commit 751f037

Browse files
scPointerAzure-stars
authored andcommitted
update to 2025s info
1 parent b6825c5 commit 751f037

File tree

3 files changed

+62
-47
lines changed

3 files changed

+62
-47
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
build-doc:
11-
if: github.repository == 'LearningOS/rCore-Tutorial-Code-2025S'
11+
if: github.repository == 'LearningOS/rCore-Camp-Code-2025S'
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
@@ -40,30 +40,16 @@ jobs:
4040
git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2025S.git ci-user
4141
git clone https://github.com/LearningOS/rCore-Tutorial-Test-2025S.git ci-user/user
4242
ID=`git rev-parse --abbrev-ref HEAD | grep -oP 'ch\K[0-9]'`
43+
# cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }}
4344
cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }} > ../output.txt
4445
cat ../output.txt
45-
- name: end
46+
- name: end
4647
id: end
4748
run: |
4849
cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}"
4950
cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}" >> $GITHUB_OUTPUT
50-
gitlab-mirror:
51-
if: github.repository == 'LearningOS/rCore-Tutorial-Code-2025S'
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v1
55-
- name: Mirror + trigger CI
56-
uses: tkf2019/gitlab-mirror-and-ci-action@master
57-
with:
58-
args: "https://git.tsinghua.edu.cn/os-lab/2025S/public/rcore-tutorial-code-2025S"
59-
env:
60-
GITLAB_HOSTNAME: "git.tsinghua.edu.cn"
61-
GITLAB_PROJECT_ID: "37679"
62-
GITLAB_PROJECT_NAME: "rcore-tutorial-code-2025S"
63-
GITLAB_PROJECT_TOKEN: ${{secrets.GITLAB_PROJECT_TOKEN}}
64-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
6551
deploy:
66-
if: github.repository != 'LearningOS/rCore-Tutorial-Code-2025S'
52+
if: github.repository != 'LearningOS/rCore-Camp-Code-2025S'
6753
name: Deploy to pages
6854
needs: basic-test
6955
runs-on: ubuntu-latest
@@ -85,4 +71,31 @@ jobs:
8571
build_dir: ./classroom
8672
keep_history: true
8773
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
- name: check score
76+
env:
77+
course_id: ${{ secrets.RCORE_2025_SPRING_COURSE_ID }}
78+
post_api: ${{ secrets.RCORE_2025_SPRING_POST_API }}
79+
token: ${{ secrets.RCORE_2025_SPRING_TOKEN }}
80+
run: |
81+
score=$(( $(grep -o 'ch' classroom/latest.json | wc -l) * 100))
82+
cat classroom/latest.json
83+
echo $score
84+
85+
github_user="${{ github.actor }}"
86+
87+
# 生成 JSON 结果
88+
score_json=$(jq -n \
89+
--arg channel "github" \
90+
--argjson courseId "$course_id" \
91+
--arg name "$github_user" \
92+
--argjson score "$score" \
93+
--argjson totalScore 500 \
94+
'{channel: $channel, courseId: $courseId, name: $name, score: $score, totalScore: $totalScore}')
95+
96+
curl -X POST $post_api \
97+
-H "accept: application/json;charset=utf-8" \
98+
-H "Content-Type: application/json" \
99+
-H "token: $token" \
100+
-d "$score_json" \
101+
-v

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ pushall.sh
2121
*.bak
2222
ci-user/
2323
user/
24-
os/vendor/
24+
os/vendor/

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1-
# rCore-Tutorial-Code-2025S
1+
# rCore-Camp-Code-2024A
22

33
### Code
4-
- [Soure Code of labs for 2025S](https://github.com/LearningOS/rCore-Tutorial-Code-2025S)
4+
- [Soure Code of labs for 2024A](https://github.com/LearningOS/rCore-Camp-Code-2024A)
55
### Documents
66

7-
- Concise Manual: [rCore-Tutorial-Guide-2025S](https://LearningOS.github.io/rCore-Tutorial-Guide-2025S/)
7+
- Concise Manual: [rCore-Camp-Guide-2024A](https://LearningOS.github.io/rCore-Camp-Guide-2024A/)
88

99
- Detail Book [rCore-Tutorial-Book-v3](https://rcore-os.github.io/rCore-Tutorial-Book-v3/)
1010

1111

12-
### OS API docs of rCore Tutorial Code 2025S
13-
- [OS API docs of ch1](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch1/os/index.html)
14-
AND [OS API docs of ch2](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch2/os/index.html)
15-
- [OS API docs of ch3](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch3/os/index.html)
16-
AND [OS API docs of ch4](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch4/os/index.html)
17-
- [OS API docs of ch5](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch5/os/index.html)
18-
AND [OS API docs of ch6](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch6/os/index.html)
19-
- [OS API docs of ch7](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch7/os/index.html)
20-
AND [OS API docs of ch8](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch8/os/index.html)
21-
- [OS API docs of ch9](https://learningos.github.io/rCore-Tutorial-Code-2025S/ch9/os/index.html)
12+
### OS API docs
13+
- [ch1](https://learningos.github.io/rCore-Camp-Code-2024A/ch1/os/index.html) [ch2](https://learningos.github.io/rCore-Camp-Code-2024A/ch2/os/index.html) [ch3](https://learningos.github.io/rCore-Camp-Code-2024A/ch3/os/index.html) [ch4](https://learningos.github.io/rCore-Camp-Code-2024A/ch4/os/index.html)
14+
- [ch5](https://learningos.github.io/rCore-Camp-Code-2024A/ch5/os/index.html) [ch6](https://learningos.github.io/rCore-Camp-Code-2024A/ch6/os/index.html) [ch7](https://learningos.github.io/rCore-Camp-Code-2024A/ch7/os/index.html) [ch8](https://learningos.github.io/rCore-Camp-Code-2024A/ch8/os/index.html)
15+
2216

2317
### Related Resources
2418
- [Learning Resource](https://github.com/LearningOS/rust-based-os-comp2022/blob/main/relatedinfo.md)
2519

2620

2721
### Build & Run
2822

23+
Replace `<YourName>` with your github ID, and replace `<Number>` with the chapter ID.
24+
25+
Notice: `<Number>` is chosen from `[1,2,3,4,5,6,7,8]`
26+
2927
```bash
30-
# setup build&run environment first
31-
$ git clone https://github.com/LearningOS/rCore-Tutorial-Code-2025S.git
32-
$ cd rCore-Tutorial-Code-2025S
33-
$ git clone https://github.com/LearningOS/rCore-Tutorial-Test-2025S.git user
28+
#
29+
$ git clone [email protected]:LearningOS/2024a-rcore-<YourName>
30+
$ cd 2024a-rcore-<YourName>
31+
$ git clone [email protected]:LearningOS/rCore-Tutorial-Test-2024A user
32+
$ git checkout ch<Number>
3433
$ cd os
35-
$ git checkout ch$ID
36-
# run OS in ch$ID
3734
$ make run
3835
```
39-
Notice: $ID is from [1-9]
4036

4137
### Grading
4238

39+
Replace `<YourName>` with your github ID, and replace `<Number>` with the chapter ID.
40+
41+
Notice: `<Number>` is chosen from `[3,4,5,6,8]`
42+
4343
```bash
44-
# setup build&run environment first
45-
$ git clone https://github.com/LearningOS/rCore-Tutorial-Code-2025S.git
46-
$ cd rCore-Tutorial-Code-2025S
47-
$ git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2025S.git ci-user
48-
$ git clone https://github.com/LearningOS/rCore-Tutorial-Test-2025S.git ci-user/user
49-
$ cd ci-user && make test CHAPTER=$ID
44+
# Replace <YourName> with your github ID
45+
$ git clone [email protected]:LearningOS/2024a-rcore-<YourName>
46+
$ cd 2024a-rcore-<YourName>
47+
$ rm -rf ci-user
48+
$ git clone [email protected]:LearningOS/rCore-Tutorial-Checker-2024A ci-user
49+
$ git clone [email protected]:LearningOS/rCore-Tutorial-Test-2024A ci-user/user
50+
$ git checkout ch<Number>
51+
$ cd ci-user
52+
$ make test CHAPTER=<Number>
5053
```
51-
Notice: $ID is from [3,4,5,6,8]

0 commit comments

Comments
 (0)