forked from YdrMaster/rCore-Tutorial-in-single-workspace
-
Notifications
You must be signed in to change notification settings - Fork 28
75 lines (63 loc) · 1.82 KB
/
workflow.yml
File metadata and controls
75 lines (63 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [ "main", "lab" ]
pull_request:
branches: [ "main", "lab" ]
workflow_dispatch:
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check format
run: cargo fmt --all --check
qemu-exercise:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
ch: [3, 4, 5, 6, 8]
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
qemu-system-misc \
python3 \
git \
curl \
build-essential
- name: Sanity check system tools
run: |
set -eux
qemu-system-riscv64 --version
python3 --version
git --version
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: riscv64gc-unknown-none-elf
components: rust-src, llvm-tools-preview
- name: Sanity check Rust
run: |
set -eux
rustc --version
cargo --version
rustup --version
- name: Mark workspace as safe git directory
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout checker
run: |
git clone --depth 1 https://github.com/LearningOS/rCore-Tutorial-Checker-2025S.git checker
- name: Run exercise in QEMU and check output (ch${{ matrix.ch }})
run: |
timeout 6m cargo qemu --ch ${{ matrix.ch }} --exercise --nobios --ci 2>&1 \
| python3 checker/check/ch${{ matrix.ch }}.py