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:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
run: |
|
||||
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
|
||||
run: cd os && cargo doc --no-deps --verbose
|
||||
- name: Deploy to Github Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./os/target/riscv64gc-unknown-none-elf/doc
|
||||
destination_dir: ${{ github.ref_name }}
|
||||
|
||||
run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build -y
|
||||
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
|
||||
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
|
||||
&& cd qemu-6.1.0 && ./configure --target-list=riscv64-softmmu && cd ..
|
||||
cd qemu-6.1.0 && sudo make install -j
|
||||
if [ ! -d qemu-7.0.0 ]; then
|
||||
wget https://download.qemu.org/qemu-7.0.0.tar.xz
|
||||
tar -xf qemu-7.0.0.tar.xz
|
||||
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
|
||||
- name: Run usertests
|
||||
run: |
|
||||
cd os && make run TEST=1
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Run usertests
|
||||
run: cd os && make run TEST=1
|
||||
|
19
.gitignore
vendored
19
.gitignore
vendored
@ -1,18 +1,13 @@
|
||||
.idea/*
|
||||
os/target/*
|
||||
os/.idea/*
|
||||
.*/*
|
||||
!.github/*
|
||||
!.vscode/settings.json
|
||||
|
||||
**/target/
|
||||
**/Cargo.lock
|
||||
|
||||
os/src/link_app.S
|
||||
os/src/linker.ld
|
||||
os/last-*
|
||||
os/Cargo.lock
|
||||
os/last-*
|
||||
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/
|
||||
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