Skip to content

Commit

Permalink
update new help info; CI for camp; add ci-user to .gitignore; fix sbi…
Browse files Browse the repository at this point in the history
…_call caused compiler UB
  • Loading branch information
scPointer committed Oct 8, 2024
1 parent 086c06c commit 30a3bf4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,29 @@ jobs:
build_dir: ./classroom
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: check score
env:
course_id: ${{ secrets.RCORE_2024_AUTUMN_COURSE_ID }}
post_api: ${{ secrets.RUSTLINGS_2024_AUTUMN_POST_API }}
run: |
score=$(( $(grep -o 'ch' classroom/latest.json | wc -l) * 100))
cat classroom/latest.json
echo $score
github_user="${{ github.actor }}"
# 生成 JSON 结果
score_json=$(jq -n \
--arg channel "github" \
--argjson courseId "$course_id" \
--arg name "$github_user" \
--argjson score "$score" \
--argjson totalScore 500 \
'{channel: $channel, courseId: $courseId, name: $name, score: $score, totalScore: $totalScore}')
curl -X POST https://"$post_api" \
-H "accept: application/json;charset=utf-8" \
-H "Content-Type: application/json" \
-d "$score_json" \
-v
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tools/
pushall.sh
*.bak

user/*
user/
ci-user/
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,34 @@

### Build & Run

Replace `<YourName>` with your github ID, and replace `<Number>` with the chapter ID.

Notice: `<Number>` is chosen from `[1,2,3,4,5,6,7,8]`

```bash
# setup build&run environment first
$ git clone https://github.com/LearningOS/rCore-Camp-Code-2024A.git
$ cd rCore-Camp-Code-2024A
$ git clone https://github.com/LearningOS/rCore-Tutorial-Test-2024A.git user
$ git checkout ch$ID
#
$ git clone git@github.com:LearningOS/2024a-rcore-<YourName>
$ cd 2024a-rcore-<YourName>
$ git clone git@github.com:LearningOS/rCore-Tutorial-Test-2024A user
$ git checkout ch<Number>
$ cd os
# run OS in ch$ID
$ make run
```
Notice: $ID is from [1-9]

### Grading

Replace `<YourName>` with your github ID, and replace `<Number>` with the chapter ID.

Notice: `<Number>` is chosen from `[3,4,5,6,8]`

```bash
# setup build&run environment first
$ git clone https://github.com/LearningOS/rCore-Camp-Code-2024A.git
$ cd rCore-Camp-Code-2024A
# Replace <YourName> with your github ID
$ git clone git@github.com:LearningOS/2024a-rcore-<YourName>
$ cd 2024a-rcore-<YourName>
$ rm -rf ci-user
$ git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2024A.git ci-user
$ git clone https://github.com/LearningOS/rCore-Tutorial-Test-2024A.git ci-user/user
$ git checkout ch$ID
# check&grade OS in ch$ID with more tests
$ cd ci-user && make test CHAPTER=$ID
$ git clone git@github.com:LearningOS/rCore-Tutorial-Checker-2024A ci-user
$ git clone git@github.com:LearningOS/rCore-Tutorial-Test-2024A ci-user/user
$ git checkout ch<Number>
$ cd ci-user
$ make test CHAPTER=<Number>
```
Notice: $ID is from [3,4,5,6,8]

0 comments on commit 30a3bf4

Please sign in to comment.