-
Notifications
You must be signed in to change notification settings - Fork 13
74 lines (60 loc) · 2.45 KB
/
meson-test.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
70
71
72
73
74
name: Meson
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
meson-build:
runs-on: ubuntu-latest
steps:
- name: "CHECKOUT: nvme-stas"
uses: actions/checkout@v4
- name: "INSTALL: build packages"
run: |
sudo apt update
sudo apt-get install --yes --quiet meson ninja-build cmake
- name: "INSTALL: python packages"
run: |
sudo apt update
sudo apt-get install --yes --quiet python3-pip python3-wheel pylint pyflakes3 python3-systemd python3-pyudev python3-lxml python3-dasbus python3-gi python3-importlib-resources python3-pyfakefs
- name: "INSTALL: documentation packages"
run: |
sudo apt update
sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc
- name: "INSTALL: remaining debian packages"
run: |
sudo apt update
sudo apt-get install --yes --quiet iproute2 libglib2.0-dev libgirepository1.0-dev libsystemd-dev
- name: "INSTALL: pip packages"
run: |
sudo pip install vermin --break-system-packages
- name: "INSTALL: libnvme packages (needed to build libnvme)"
run: |
sudo apt-get install --yes --quiet swig libjson-c-dev
- name: "CONFIG: PYTHONPATH"
run: |
echo "PYTHONPATH=.build:.build/subprojects/libnvme:/usr/lib/python3/dist-packages/" >> $GITHUB_ENV
- name: "TEST: nvme-stas"
uses: BSFishy/meson-build@v1.0.3
with:
action: test
directory: .build
setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:buildtype=release -Dlibnvme:sysconfdir=/etc -Dlibnvme:prefix=/usr -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled
options: --print-errorlogs --suite nvme-stas
# Preserve meson's log file on failure
- uses: actions/upload-artifact@v4
if: failure()
with:
name: "Linux_Meson_Testlog"
path: .build/meson-logs/*
- name: "Generate coverage report"
run: |
sudo apt-get install python3-pytest python3-pytest-cov
echo $( pwd )
cp -r .build/staslib/* ./staslib/.
pytest --cov=./staslib --cov-report=xml test/test-*.py
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false