generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 17
68 lines (66 loc) · 2.69 KB
/
litevm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: litevm test
on:
push:
branches:
- main
pull_request:
jobs:
commit-hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Set up Python
with:
python-version: '3.x'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hooks
run: pre-commit run --all-files --show-diff-on-failure
test:
runs-on: ubuntu-22.04
strategy:
matrix:
# Our minimum supported version of Python is 3.6, used by Oracle Linux 7
# & 8. Ideally we would run tests on that, along with Python 3.9 for
# Oracle Linux 9, and maybe Python 3.12 for an upcoming Oracle Linux 10.
# However, practicality rules here. The binutils provided in Ubuntu
# 20.04 is not recent enough for our libctf usage, but 20.04 is the only
# remaining Ubuntu image with Python 3.6 available in Github actions.
# So we have to eliminate Python 3.6 from our test matrix. Other CI
# tests do run on Python 3.6, and there is the "vermin" pre-commit hook
# which detects code incompatible with 3.6.
python-minor: ["9", "12"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.${{ matrix.python-minor }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qemu-kvm zstd gzip bzip2 cpio busybox-static fio \
autoconf automake check gcc git liblzma-dev \
libelf-dev libdw-dev libtool make pkgconf zlib1g-dev \
binutils-dev
sudo wget -O /usr/bin/rpm2cpio https://github.com/rpm-software-management/rpm/raw/rpm-4.19.0-release/scripts/rpm2cpio.sh
echo '0403da24a797ccfa0cfd37bd4a6d6049370b9773e558da6173ae6ad25f97a428 /usr/bin/rpm2cpio' | sha256sum -c -
sudo chmod 755 /usr/bin/rpm2cpio
- name: Setup test environment
# Pinned virtualenv and tox are for the last versions which support
# detecting Python 3.6 and running tests on it.
run: |
python -m venv venv
venv/bin/pip install -r testing/requirements-litevm.txt
venv/bin/pip install setuptools
- name: Build and install drgn with CTF support
run: |
cd ..
git clone https://github.com/brenns10/drgn -b ctf_0.0.30
cd drgn
../drgn-tools/venv/bin/python setup.py install
- name: Run tests
run: |
venv/bin/python -m testing.litevm.vm --delete-after-test --with-ctf