fix: adapt to new libnvme nvme.ctrl() dict-based constructor #986
Workflow file for this run
This file contains hidden or 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: Meson | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 4 * * 0' # Sundays at 4:00 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| meson-build: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| steps: | |
| - name: "CHECKOUT: nvme-stas" | |
| uses: actions/checkout@v6 | |
| - name: "INSTALL: build packages" | |
| run: | | |
| sudo apt update | |
| sudo apt-get install --yes --quiet ninja-build cmake | |
| # Jammy ships meson 0.61 which is too old; install a newer version via pip | |
| if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then | |
| pip install meson | |
| else | |
| sudo apt-get install --yes --quiet meson | |
| fi | |
| - name: "INSTALL: python packages" | |
| run: | | |
| sudo apt-get install --yes --quiet python3-pip python3-wheel python3-systemd python3-pyudev python3-lxml python3-dasbus python3-gi python3-importlib-resources python3-pyfakefs | |
| - name: "INSTALL: documentation packages" | |
| run: | | |
| sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc | |
| - name: "INSTALL: remaining debian packages" | |
| run: | | |
| sudo apt-get install --yes --quiet iproute2 libglib2.0-dev libgirepository1.0-dev libsystemd-dev | |
| - name: "INSTALL: pip packages" | |
| run: | | |
| pip install vermin ruff | |
| - 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/nvme-cli/libnvme:/usr/lib/python3/dist-packages/" >> $GITHUB_ENV | |
| - name: "TEST: nvme-stas" | |
| run: | | |
| meson setup .build --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dnvme-cli:buildtype=release -Dnvme-cli:sysconfdir=/etc -Dnvme-cli:prefix=/usr -Dnvme-cli:python=enabled -Dnvme-cli:libdbus=disabled -Dnvme-cli:openssl=disabled -Dnvme-cli:json-c=disabled -Dnvme-cli:keyutils=disabled | |
| meson compile -C .build | |
| meson test -C .build --print-errorlogs --suite nvme-stas | |
| # Preserve meson's log file on failure | |
| - uses: actions/upload-artifact@v7 | |
| 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/. | |
| python3 -m pytest --cov=./staslib --cov-report=xml test/test-*.py | |
| - uses: codecov/codecov-action@v6 | |
| with: | |
| fail_ci_if_error: false |