mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 18:36:24 +04:00
ci: cache qemu
update: .gitignore, .vscode/settings.json
This commit is contained in:
parent
8e73480c99
commit
c9a288c110
56
.github/workflows/doc-and-test.yml
vendored
56
.github/workflows/doc-and-test.yml
vendored
@ -9,37 +9,57 @@ jobs:
|
|||||||
build-doc:
|
build-doc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly-2022-04-11
|
||||||
|
components: rust-src, llvm-tools-preview
|
||||||
|
target: riscv64gc-unknown-none-elf
|
||||||
- name: Build doc
|
- name: Build doc
|
||||||
run: |
|
run: cd os && cargo doc --no-deps --verbose
|
||||||
rustup target add riscv64gc-unknown-none-elf
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
rustup component add rust-src
|
|
||||||
cd os
|
|
||||||
cargo doc --no-deps --verbose
|
|
||||||
- name: Deploy to Github Pages
|
- name: Deploy to Github Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./os/target/riscv64gc-unknown-none-elf/doc
|
publish_dir: ./os/target/riscv64gc-unknown-none-elf/doc
|
||||||
destination_dir: ${{ github.ref_name }}
|
destination_dir: ${{ github.ref_name }}
|
||||||
|
|
||||||
run-tests:
|
run-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly-2022-04-11
|
||||||
|
components: rust-src, llvm-tools-preview
|
||||||
|
target: riscv64gc-unknown-none-elf
|
||||||
|
- uses: actions-rs/install@v0.1
|
||||||
|
with:
|
||||||
|
crate: cargo-binutils
|
||||||
|
version: latest
|
||||||
|
use-tool-cache: true
|
||||||
|
- name: Cache QEMU
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: qemu-7.0.0
|
||||||
|
key: qemu-7.0.0-x86_64-riscv64
|
||||||
- name: Install QEMU
|
- name: Install QEMU
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ninja-build -y
|
sudo apt-get install ninja-build -y
|
||||||
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
|
if [ ! -d qemu-7.0.0 ]; then
|
||||||
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
|
wget https://download.qemu.org/qemu-7.0.0.tar.xz
|
||||||
&& cd qemu-6.1.0 && ./configure --target-list=riscv64-softmmu && cd ..
|
tar -xf qemu-7.0.0.tar.xz
|
||||||
cd qemu-6.1.0 && sudo make install -j
|
cd qemu-7.0.0
|
||||||
|
./configure --target-list=riscv64-softmmu
|
||||||
|
make -j
|
||||||
|
else
|
||||||
|
cd qemu-7.0.0
|
||||||
|
fi
|
||||||
|
sudo make install
|
||||||
qemu-system-riscv64 --version
|
qemu-system-riscv64 --version
|
||||||
|
|
||||||
- name: Run usertests
|
- name: Run usertests
|
||||||
run: |
|
run: cd os && make run TEST=1
|
||||||
cd os && make run TEST=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
19
.gitignore
vendored
19
.gitignore
vendored
@ -1,18 +1,13 @@
|
|||||||
.idea/*
|
.*/*
|
||||||
os/target/*
|
!.github/*
|
||||||
os/.idea/*
|
!.vscode/settings.json
|
||||||
|
|
||||||
|
**/target/
|
||||||
|
**/Cargo.lock
|
||||||
|
|
||||||
os/src/link_app.S
|
os/src/link_app.S
|
||||||
os/src/linker.ld
|
os/src/linker.ld
|
||||||
os/last-*
|
os/last-*
|
||||||
os/Cargo.lock
|
|
||||||
os/last-*
|
|
||||||
os/.gdb_history
|
os/.gdb_history
|
||||||
user/target/*
|
|
||||||
user/.idea/*
|
|
||||||
user/Cargo.lock
|
|
||||||
easy-fs/Cargo.lock
|
|
||||||
easy-fs/target/*
|
|
||||||
easy-fs-fuse/Cargo.lock
|
|
||||||
easy-fs-fuse/target/*
|
|
||||||
tools/
|
tools/
|
||||||
pushall.sh
|
pushall.sh
|
||||||
|
10
.vscode/settings.json
vendored
Normal file
10
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
// Prevent "can't find crate for `test`" error on no_std
|
||||||
|
// Ref: https://github.com/rust-lang/vscode-rust/issues/729
|
||||||
|
// For vscode-rust plugin users:
|
||||||
|
"rust.target": "riscv64gc-unknown-none-elf",
|
||||||
|
"rust.all_targets": false,
|
||||||
|
// For Rust Analyzer plugin users:
|
||||||
|
"rust-analyzer.cargo.target": "riscv64gc-unknown-none-elf",
|
||||||
|
"rust-analyzer.checkOnSave.allTargets": false
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user