Merge pull request #643 from zhangzihengya/develop #5
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: kvm_watcher | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/kvm_watcher/**' | |
- '.github/workflows/kvm_watcher.yml' | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/kvm_watcher/**' | |
- '.github/workflows/kvm_watcher.yml' | |
jobs: | |
kvm_watcher-project-build-and-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt install clang libelf1 libelf-dev zlib1g-dev | |
sudo apt install libbpf-dev | |
sudo apt install linux-tools-$(uname -r) | |
sudo apt install linux-cloud-tools-$(uname -r) | |
sudo apt-get update && sudo apt-get install -y qemu-kvm | |
- name: Download Cirros image | |
run: | | |
wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img | |
- name: Load KVM module | |
run: | | |
sudo modprobe kvm && sudo modprobe kvm-intel | |
- name: Run QEMU to start VM | |
run: | | |
sudo qemu-system-x86_64 -enable-kvm -cpu host -m 2048 -drive file=cirros-0.5.1-x86_64-disk.img,format=qcow2 -boot c -nographic & | |
- name: Run kvm_watcher | |
run: | | |
cd eBPF_Supermarket/kvm_watcher/ | |
make | |
sudo ./kvm_watcher -w -t 10 | |
sudo ./kvm_watcher -e -t 10 -s | |
sudo ./kvm_watcher -n -t 10 | |
sudo ./kvm_watcher -d -t 10 | |
sudo ./kvm_watcher -f -m -t 10 | |
sudo ./kvm_watcher -i -t 10 | |
make clean | |