111 lines
3.5 KiB
YAML
111 lines
3.5 KiB
YAML
name: Kernel Test
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
container: asterinas/asterinas:0.4.2
|
|
steps:
|
|
- run: echo "Running in asterinas/asterinas:0.4.2"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check
|
|
id: check
|
|
run: make check
|
|
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
container: asterinas/asterinas:0.4.2
|
|
steps:
|
|
- run: echo "Running in asterinas/asterinas:0.4.2"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Usermode Unit test
|
|
id: usermode_unit_test
|
|
run: make test
|
|
|
|
- name: Ktest Unit Test
|
|
id: ktest_unit_test
|
|
run: make ktest
|
|
|
|
# TODO: add component check.
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
container: asterinas/asterinas:0.4.2
|
|
steps:
|
|
- run: echo "Running in asterinas/asterinas:0.4.2"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Boot Test (Multiboot)
|
|
id: boot_test_mb
|
|
run: make run AUTO_TEST=boot ENABLE_KVM=0 BOOT_PROTOCOL=multiboot RELEASE=1
|
|
|
|
- name: Boot Test (Multiboot2)
|
|
id: boot_test_mb2
|
|
run: make run AUTO_TEST=boot ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2 RELEASE=1
|
|
|
|
- name: Boot Test (MicroVM)
|
|
id: boot_test_microvm
|
|
run: make run AUTO_TEST=boot ENABLE_KVM=0 SCHEME=microvm RELEASE=1
|
|
|
|
- name: Boot Test (Linux Legacy 32-bit Boot Protocol)
|
|
id: boot_test_linux_legacy32
|
|
run: make run AUTO_TEST=boot ENABLE_KVM=0 BOOT_PROTOCOL=linux-legacy32 RELEASE=1
|
|
|
|
- name: Boot Test (Linux EFI Handover Boot Protocol)
|
|
id: boot_test_linux_efi_handover64
|
|
run: make run AUTO_TEST=boot ENABLE_KVM=0 BOOT_PROTOCOL=linux-efi-handover64 RELEASE=1
|
|
|
|
- name: Syscall Test (Linux EFI Handover Boot Protocol)
|
|
id: syscall_test
|
|
run: make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_PROTOCOL=linux-efi-handover64 RELEASE=1
|
|
|
|
- name: Syscall Test at Ext2 (MicroVM)
|
|
id: syscall_test_at_ext2
|
|
run: make run AUTO_TEST=syscall SYSCALL_TEST_DIR=/ext2 ENABLE_KVM=0 SCHEME=microvm RELEASE=1
|
|
|
|
- name: Syscall Test at Exfat
|
|
id: syscall_test_at_exfat_linux
|
|
run: make run AUTO_TEST=syscall SYSCALL_TEST_DIR=/exfat EXTRA_BLOCKLISTS_DIRS=blocklists.exfat ENABLE_KVM=0 BOOT_PROTOCOL=linux-efi-handover64 RELEASE=1
|
|
|
|
- name: Regression Test (Linux EFI Handover Boot Protocol)
|
|
id: regression_test_linux
|
|
run: make run AUTO_TEST=regression ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2 RELEASE=1
|
|
|
|
vsock-test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run Vsock Server on Host
|
|
id: host_vsock_server
|
|
run: |
|
|
sudo modprobe vhost_vsock
|
|
sudo apt-get install socat
|
|
echo "Run vsock server on host...."
|
|
socat -dd vsock-listen:1234 SYSTEM:"sleep 3s; echo 'Hello from host';sleep 2s;kill -INT $$" &
|
|
- name: Run Vsock Client and Server on Guest
|
|
id: guest_vsock_client_server
|
|
run: |
|
|
docker run --privileged --network=host --device=/dev/kvm -v ./:/root/asterinas asterinas/asterinas:0.4.2 \
|
|
make run AUTO_TEST=vsock ENABLE_KVM=0 QEMU_MACHINE=microvm RELEASE_MODE=1 &
|
|
- name: Run Vsock Client on Host
|
|
id: host_vsock_client
|
|
run: |
|
|
sleep 5m
|
|
echo "Run vsock client on host...."
|
|
echo "Hello from host" | socat -dd - vsock-connect:3:4321
|