add building kinux kernel #6
Workflow file for this run
This file contains 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: Run module | |
on: | |
push: | |
pull_request: | |
jobs: | |
run: | |
runs-on: ubuntu-22.04 | |
steps: | |
### DEPENDENCIES ### | |
# Hard turn-off interactive mode | |
- run: echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections | |
# Install dependencies | |
- run: sudo apt update | |
- run: sudo apt -y install bison busybox-static cargo cmake coreutils cpio elfutils file flex gcc gcc-multilib git iproute2 jq kbd kmod libcap-dev libelf-dev libunwind-dev libvirt-clients libzstd-dev linux-headers-generic linux-tools-common linux-tools-generic make ninja-build pahole pkg-config python3-dev python3-pip python3-requests qemu-kvm rsync rustc stress-ng udev zstd | |
### END DEPENDENCIES ### | |
# Install virtme-ng | |
- run: pip install virtme-ng | |
# Checkout git repository | |
- uses: actions/checkout@v4 | |
# Get the latest linux kernel | |
- run: git clone --single-branch -b master --depth 1 https://github.com/torvalds/linux.git | |
# Print the latest commit of the checked out sched-ext kernel | |
- run: cd linux && git log -1 --pretty=format:"%h %ad %s" --date=short | |
# Run `uname -r` using a vanilla v6.6 kernel | |
- run: cd linux && vng -v --build | |
# Generate kernel headers | |
- run: cd linux && make headers | |
# Run VM & test kernel module | |
- run: vng -v -- ls .. | |
# Setup KVM support | |
- name: "KVM support" | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
# Re-run with KVM support | |
- name: "Check KVM support" | |
run: | | |
clocksource="/sys/devices/system/clocksource/clocksource0/current_clocksource" | |
[ "$(vng -r v6.9 -- cat "${clocksource}")" = "kvm-clock" ] |