Skip to content

Commit 6f9c08a

Browse files
author
szy
committed
Merge remote-tracking branch 'upstream/next2' into next2
2 parents 08507ff + b9abbeb commit 6f9c08a

File tree

19 files changed

+2312
-486
lines changed

19 files changed

+2312
-486
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
args = [
2+
"-nographic",
3+
"-cpu",
4+
"cortex-a72",
5+
"-machine",
6+
"virt,virtualization=on,gic-version=3",
7+
"-smp",
8+
"1",
9+
"-append",
10+
"root=/dev/vda rw init=/init",
11+
"-m",
12+
"8g",
13+
]
14+
fail_regex = []
15+
success_regex = []
16+
to_bin = true
17+
uefi = false

.github/workflows/test.yml renamed to .github/workflows/test-board.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Test CI
1+
name: Test for BOARD
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
board-test:
7-
name: "Test ${{ matrix.board }} - ${{ matrix.vmconfigs_name }}"
6+
test-board:
7+
name: "Test board: ${{ matrix.board }} - ${{ matrix.vmconfigs_name }}"
88
strategy:
99
matrix:
1010
include:
@@ -19,16 +19,16 @@ jobs:
1919
vmconfigs: configs/vms/linux-aarch64-e2000-smp1.toml
2020
vmconfigs_name: Linux
2121
vmimage_name: phytiumpi_linux.tar.gz
22-
- board: roc-rk3568-pc
23-
vmconfigs: configs/vms/arceos-aarch64-rk3568-smp1.toml
24-
vmconfigs_name: ArceOS
25-
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
26-
vmimage_name: roc-rk3568-pc_arceos.tar.gz
27-
- board: roc-rk3568-pc
28-
vmconfigs: configs/vms/linux-aarch64-rk3568-smp1.toml
29-
vmconfigs_name: Linux
30-
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
31-
vmimage_name: roc-rk3568-pc_linux.tar.gz
22+
# - board: roc-rk3568-pc
23+
# vmconfigs: configs/vms/arceos-aarch64-rk3568-smp1.toml
24+
# vmconfigs_name: ArceOS
25+
# # Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
26+
# vmimage_name: roc-rk3568-pc_arceos.tar.gz
27+
# - board: roc-rk3568-pc
28+
# vmconfigs: configs/vms/linux-aarch64-rk3568-smp1.toml
29+
# vmconfigs_name: Linux
30+
# # Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
31+
# vmimage_name: roc-rk3568-pc_linux.tar.gz
3232
fail-fast: false
3333
runs-on:
3434
- self-hosted
@@ -39,7 +39,7 @@ jobs:
3939
- name: Checkout
4040
uses: actions/checkout@v4
4141

42-
- name: Install dependencies (${{ matrix.board_name }})
42+
- name: Install dependencies
4343
run: cargo +stable install -f --git https://github.com/ZR233/ostool ostool
4444

4545
- name: Download images and patch VM configs

.github/workflows/test-qemu.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test for QEMU
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
test-qemu:
7+
name: "Test qemu: ${{ matrix.arch }} - ${{ matrix.vmconfigs_name }}"
8+
strategy:
9+
matrix:
10+
include:
11+
- arch: aarch64
12+
vmconfigs: configs/vms/arceos-aarch64-qemu-smp1.toml
13+
vmconfigs_name: ArceOS
14+
vmimage_name: qemu_arceos_aarch64
15+
# - arch: riscv64
16+
# vmconfigs: configs/vms/arceos-riscv64-qemu-smp1.toml
17+
# vmconfigs_name: ArceOS
18+
# vmimage_name: qemu_arceos_riscv64
19+
# - arch: x86_64
20+
# vmconfigs: configs/vms/arceos-x86_64-qemu-smp1.toml
21+
# vmconfigs_name: ArceOS
22+
# vmimage_name: qemu_arceos_x86_64
23+
fail-fast: false
24+
runs-on:
25+
- self-hosted
26+
- linux
27+
- intel
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Install dependencies
34+
run: cargo +stable install -f --git https://github.com/ZR233/ostool ostool
35+
36+
- name: Download images and patch VM configs
37+
run: |
38+
echo "Downloading guest images and patching VM config files..."
39+
IFS=',' read -ra CONFIGS <<< "${{ matrix.vmconfigs }}"
40+
IFS=',' read -ra IMAGES <<< "${{ matrix.vmimage_name }}"
41+
for i in "${!CONFIGS[@]}"; do
42+
img="${IMAGES[$i]}"
43+
img=$(echo "$img" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
44+
config="${CONFIGS[$i]}"
45+
config=$(echo "$config" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
46+
cargo xtask image download $img
47+
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img"'"|' "$config"
48+
echo "Updated kernel_path in $config"
49+
done
50+
51+
- name: Run tests
52+
run: |
53+
export RUST_LOG=debug
54+
cargo xtask qemu \
55+
--build-config configs/board/qemu-${{ matrix.arch }}.toml \
56+
--qemu-config .github/workflows/qemu-${{ matrix.arch }}.toml \
57+
--vmconfigs ${{ matrix.vmconfigs }}

.github/workflows/uboot.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ success_regex = [
1212
"Hello World!",
1313
"root@firefly:~#",
1414
"root@phytium-Ubuntu:~#",
15+
"Welcome to Phytium Buildroot",
1516
]
1617

1718
[net]

Cargo.lock

Lines changed: 42 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)