drgn/.travis.yml
Omar Sandoval 903a44d0dd travis: upgrade to Ubuntu 20.04
This picks up a newer version of QEMU and lets us use udevadm trigger
-w. Let's also explicitly add "os: linux" to silence the config
validation.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-08-20 17:57:39 -07:00

42 lines
1.3 KiB
YAML

os: linux
dist: focal
language: python
python:
- '3.8'
- '3.7'
- '3.6'
install:
# If the host is running a kernel without Linux kernel commit b4d185175bc1
# ("KVM: VMX: give unrestricted guest full control of CR3") (in v4.17), then
# stores to CR3 in the nested guest can spuriously fail and cause it to
# crash. We can work around this by disabling unrestricted guest support.
- |
if grep -q '^flags\b.*\bvmx\b' /proc/cpuinfo; then
echo "options kvm_intel unrestricted_guest=N" | sudo tee /etc/modprobe.d/kvm-cr3-workaround.conf > /dev/null
sudo modprobe -r kvm_intel
sudo modprobe kvm_intel
fi
# Upstream defaults to world-read-writeable /dev/kvm. Debian/Ubuntu override
# this; see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892945. We want
# the upstream default.
- echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /lib/udev/rules.d/99-fix-kvm.rules > /dev/null
- sudo udevadm control --reload-rules
- sudo udevadm trigger -w /dev/kvm
- pip install black isort mypy
script:
- black --check --diff .
- isort --check --diff .
- mypy --strict --no-warn-return-any drgn _drgn.pyi
- python setup.py test -K
addons:
apt:
packages:
- busybox-static
- libbz2-dev
- liblzma-dev
- qemu-kvm
- zlib1g-dev
- zstd