-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
.gitlab-ci.yml
69 lines (65 loc) · 2.55 KB
/
.gitlab-ci.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
69
checks:pylint:
before_script:
- sudo dnf install -y python3-pip
- git clone https://github.com/QubesOS/qubes-core-qrexec ~/qubes-core-qrexec
- pip3 install --quiet -r ci/requirements.txt
script:
- PYTHONPATH=test-packages:~/qubes-core-qrexec python3 -m pylint qubes
stage: checks
checks:tests:
after_script:
- ci/codecov-wrapper -F unittests
before_script:
- sudo dnf install -y lvm2 vim-common python3-lxml python3-docutils sequoia-sqv python3-pip
# needed to run tests on Python 3.12
- "sudo dnf install -y python3-pyasyncore || :"
- git clone https://github.com/QubesOS/qubes-core-qrexec ~/qubes-core-qrexec
- pip3 install --user --quiet -r ci/requirements.txt
- |
set -e
# Installing ZFS after the CI requirements so after_script codecov-wrapper does not explode if ZFS install fails.
kver=$(uname -r)
echo $kver is the running kernel >&2
sudo dnf install -y https://zfsonlinux.org/fedora/zfs-release-2-5$(rpm --eval "%{dist}").noarch.rpm
# We are now going to force the installation of the specific kernel-devel version
# that matches the current kernel. If unavailable, the test should fail now.
# Ideally the VM image ships with a kernel-devel package that matches the
# booted kernel. This is already the case for Qubes DispVM.
uname -r | grep -q qubes || sudo dnf install -y kernel-core-$kver kernel-devel-$kver
sudo dnf install -y zfs
# Proactively load the kernel module with the right size ARC to prevent memory
# starvation during integration tests. Otherwise the ARC will not reduce
# itself unless there's memory pressure, and the system will fail to request
# memory from qmemman since qmemman will not see enough memory to run.
sudo modprobe zfs zfs_arc_max=67108864
script:
- PYTHONPATH=test-packages:~/qubes-core-qrexec ./run-tests
stage: checks
tags:
- vm
mypy:
stage: checks
image: fedora:40
tags:
- docker
before_script:
- sudo dnf install -y python3-mypy python3-pip
- sudo python3 -m pip install lxml-stubs types-docutils types-pywin32
script:
- mypy --install-types --non-interactive --ignore-missing-imports --exclude tests/ --junit-xml mypy.xml qubes
artifacts:
reports:
junit: mypy.xml
include:
- file: /common.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.3/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.3/gitlab-host.yml
project: QubesOS/qubes-continuous-integration
lint:
extends: .lint
stage: checks
variables:
DIR: qubes
SKIP_PYLINT: 1