Skip to content

Lintestor Test

Lintestor Test #11

name: Lintestor Test
on:
schedule:
- cron: '0 2 * * 1' # 每周一凌晨2点运行
workflow_dispatch: # 允许手动触发
jobs:
test:
runs-on: [self-hosted, linux]
env:
PRINT_SSH_MSG: 1
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev # lintestor build dependencies
sudo apt-get install -y qemu-utils qemu-system-x86 qemu-system-misc opensbi u-boot-qemu
sudo apt-get install -y sshpass
- name: Setup RISC-V Debian QEMU
run: |
cd ..
wget -O rv64deb.zip "https://gitlab.com/api/v4/projects/giomasce%2Fdqib/jobs/artifacts/master/download?job=convert_riscv64-virt"
unzip rv64deb.zip
cd dqib_riscv64-virt
echo 'qemu-system-riscv64 -machine virt -m 1G -smp 8 -cpu rv64 \' > boot.sh
echo '-device virtio-blk-device,drive=hd \' >> boot.sh
echo '-drive file=image.qcow2,if=none,id=hd \' >> boot.sh
echo '-device virtio-net-device,netdev=net \' >> boot.sh
echo '-netdev user,id=net,hostfwd=tcp::2222-:22 \' >> boot.sh
echo '-bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf \' >> boot.sh
echo '-kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \' >> boot.sh
echo '-object rng-random,filename=/dev/urandom,id=rng \' >> boot.sh
echo '-device virtio-rng-device,rng=rng \' >> boot.sh
echo '-nographic -append "root=LABEL=rootfs console=ttyS0"' >> boot.sh
chmod +x boot.sh
ls -l # 展示文件结构
cd ../lintestor # 回到项目目录
ls -l # 再次展示文件结构
- name: Run Lintestor
run: |
ls -l ../ # 展示上级文件结构
ls -l ../dqib_riscv64-virt # 展示文件结构
cargo run -- --test --aggr --summ
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: |
reports.json
summary.md