Skip to content

Commit 122ad8f

Browse files
committed
ch2
1 parent 3b5fc09 commit 122ad8f

File tree

3 files changed

+34
-42
lines changed

3 files changed

+34
-42
lines changed

.github/workflows/doc-and-test.yml

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,6 @@ env:
77
rust_toolchain: nightly-2024-01-18
88

99
jobs:
10-
build-doc:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions-rs/toolchain@v1
15-
with:
16-
profile: minimal
17-
toolchain: ${{ env.rust_toolchain }}
18-
components: rust-src, llvm-tools-preview
19-
target: riscv64gc-unknown-none-elf
20-
- name: Build doc
21-
run: cd os && cargo doc --no-deps --verbose
22-
- name: Deploy to Github Pages
23-
uses: peaceiris/actions-gh-pages@v3
24-
with:
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
26-
publish_dir: ./os/target/riscv64gc-unknown-none-elf/doc
27-
destination_dir: ${{ github.ref_name }}
28-
2910
run-tests:
3011
runs-on: ubuntu-latest
3112
steps:
@@ -44,25 +25,41 @@ jobs:
4425
- name: Cache QEMU
4526
uses: actions/cache@v3
4627
with:
47-
path: qemu-7.0.0
48-
key: qemu-7.0.0-x86_64-riscv64
28+
path: qemu-8.2.1
29+
key: qemu-8.2.1-x86_64-riscv64
4930
- name: Install QEMU
5031
run: |
51-
sudo apt-get update
52-
sudo apt-get install ninja-build -y
53-
if [ ! -d qemu-7.0.0 ]; then
54-
wget https://download.qemu.org/qemu-7.0.0.tar.xz
55-
tar -xf qemu-7.0.0.tar.xz
56-
cd qemu-7.0.0
57-
./configure --target-list=riscv64-softmmu
32+
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
33+
unzip ninja-linux.zip
34+
sudo mv ninja /usr/local/bin/
35+
ninja --version
36+
if [ ! -d qemu-8.2.1 ]; then
37+
wget https://download.qemu.org/qemu-8.2.1.tar.xz
38+
tar -xf qemu-8.2.1.tar.xz
39+
cd qemu-8.2.1
40+
./configure --target-list=riscv64-softmmu,x86_64-softmmu,loongarch64-softmmu,aarch64-softmmu
5841
make -j
5942
else
60-
cd qemu-7.0.0
43+
cd qemu-8.2.1
6144
fi
6245
sudo make install
6346
qemu-system-riscv64 --version
47+
qemu-system-aarch64 --version
48+
qemu-system-loongarch64 --version
49+
qemu-system-x86_64 --version
6450
65-
- name: Run usertests
51+
- name: Run usertests in RISC-V
6652
run: cd os && make run TEST=1
6753
timeout-minutes: 10
6854

55+
- name: Run usertests in AArch64
56+
run: cd os && make run TEST=1 ARCH=aarch64
57+
timeout-minutes: 10
58+
59+
# - name: Run usertests in LoongArch64
60+
# run: cd os && make run TEST=1 ARCH=loongarch64
61+
# timeout-minutes: 10
62+
63+
- name: Run usertests in x86_64
64+
run: cd os && make run TEST=1 ARCH=x86_64
65+
timeout-minutes: 10

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ easy-fs-fuse/target/*
2424
tools/
2525
pushall.sh
2626
*.bak
27+
28+
*log*
29+
/bin

os/Cargo.toml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,10 @@ edition = "2021"
1010
bitflags = "1.2.1"
1111
buddy_system_allocator = "0.6"
1212
log = "0.4"
13-
14-
[dependencies.lazy_static]
15-
features = ["spin_no_std"]
16-
version = "1.4.0"
17-
18-
[dependencies.polyhal]
19-
features = ["kcontext"]
20-
git = "https://github.com/Byte-OS/polyhal.git"
21-
22-
[dependencies.riscv]
23-
features = ["inline-asm"]
24-
git = "https://github.com/rcore-os/riscv"
13+
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
14+
polyhal = { git = "https://github.com/Huzhiwen1208/polyhal.git", branch = "feature/libos-sup", features = [
15+
"kcontext",
16+
] }
2517

2618
[profile.release]
2719
debug = true

0 commit comments

Comments
 (0)