This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Rust Doc And Run tests | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
rust_toolchain: nightly-2024-01-18 | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ env.rust_toolchain }} | |
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-8.2.1 | |
key: qemu-8.2.1-x86_64-riscv64 | |
- name: Install QEMU | |
run: | | |
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip | |
unzip ninja-linux.zip | |
sudo mv ninja /usr/local/bin/ | |
ninja --version | |
if [ ! -d qemu-8.2.1 ]; then | |
wget https://download.qemu.org/qemu-8.2.1.tar.xz | |
tar -xf qemu-8.2.1.tar.xz | |
cd qemu-8.2.1 | |
./configure --target-list=riscv64-softmmu,x86_64-softmmu,loongarch64-softmmu,aarch64-softmmu | |
make -j | |
else | |
cd qemu-8.2.1 | |
fi | |
sudo make install | |
qemu-system-riscv64 --version | |
qemu-system-aarch64 --version | |
qemu-system-loongarch64 --version | |
qemu-system-x86_64 --version | |
- name: Run usertests in RISC-V | |
run: cd os && make run TEST=1 | |
timeout-minutes: 10 | |
- name: Run usertests in AArch64 | |
run: cd os && make run TEST=1 ARCH=aarch64 | |
timeout-minutes: 10 | |
- name: Run usertests in x86_64 | |
run: cd os && make run TEST=1 ARCH=x86_64 | |
timeout-minutes: 10 | |
# - name: Run usertests in LoongArch64 | |
# run: | | |
# trap 'exit 0' SIGTERM | |
# cd os && make run TEST=1 ARCH=loongarch64 | |
# timeout-minutes: 2 | |