diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/meson-test.yml | 26 | ||||
-rw-r--r-- | .github/workflows/pylint.yml | 46 |
2 files changed, 19 insertions, 53 deletions
diff --git a/.github/workflows/meson-test.yml b/.github/workflows/meson-test.yml index 24c6e57..eff6df1 100644 --- a/.github/workflows/meson-test.yml +++ b/.github/workflows/meson-test.yml @@ -17,36 +17,20 @@ jobs: - name: "INSTALL: Overall dependencies" run: | - sudo apt-mark hold grub-efi-amd64-signed # Workaround for upstream issue - sudo apt-get update --yes --quiet - sudo apt-get upgrade --yes --quiet sudo apt-get install --yes --quiet python3-pip cmake iproute2 sudo python3 -m pip install --upgrade pip sudo python3 -m pip install --upgrade wheel meson ninja - name: "INSTALL: nvme-stas dependencies" run: | - sudo apt-get install --yes --quiet docbook-xml - sudo apt-get install --yes --quiet docbook-xsl - sudo apt-get install --yes --quiet xsltproc - sudo apt-get install --yes --quiet libglib2.0-dev - sudo apt-get install --yes --quiet libgirepository1.0-dev - sudo apt-get install --yes --quiet libsystemd-dev - sudo apt-get install --yes --quiet python3-systemd - sudo apt-get install --yes --quiet python3-pyudev - sudo apt-get install --yes --quiet python3-lxml + sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc libglib2.0-dev libgirepository1.0-dev libsystemd-dev + sudo apt-get install --yes --quiet python3-systemd python3-pyudev python3-lxml python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject python3 -m pip install --upgrade vermin pyfakefs importlib-resources - name: "INSTALL: libnvme dependencies" run: | - sudo apt-get install --yes --quiet swig - sudo apt-get install --yes --quiet libjson-c-dev - - - name: "SETUP: [nvme-stas, libnvme]" - run: | - meson subprojects download - meson setup --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled .build + sudo apt-get install --yes --quiet swig libjson-c-dev - name: "CONFIG: PYTHONPATH" run: | @@ -57,7 +41,7 @@ jobs: with: action: test directory: .build - setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled + 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 @@ -77,4 +61,4 @@ jobs: - uses: codecov/codecov-action@v3 with: - fail_ci_if_error: false
\ No newline at end of file + fail_ci_if_error: false diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index fc2bd14..cd200f9 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -37,44 +37,26 @@ jobs: with: python-version: ${{ matrix.python-version }} -# - name: "UPGRADE: existing packages" -# run: | -# sudo apt-get update --yes --quiet || true -# sudo apt-get upgrade --yes --quiet || true - - name: "INSTALL: additional packages" run: | - sudo apt-get install --yes --quiet python3-pip || true - sudo apt-get install --yes --quiet cmake || true - sudo apt-get install --yes --quiet libgirepository1.0-dev || true - sudo apt-get install --yes --quiet libsystemd-dev || true - sudo apt-get install --yes --quiet python3-systemd || true - sudo python3 -m pip install --upgrade pip - sudo python3 -m pip install --upgrade wheel - sudo python3 -m pip install --upgrade meson - sudo python3 -m pip install --upgrade ninja - python3 -m pip install --upgrade dasbus - python3 -m pip install --upgrade pylint - python3 -m pip install --upgrade pyflakes - python3 -m pip install --upgrade PyGObject - python3 -m pip install --upgrade lxml - python3 -m pip install --upgrade pyudev - - - name: "BUILD: libnvme" - run: | - sudo apt-get install --yes --quiet swig libjson-c-dev || true - meson subprojects download - meson setup builddir subprojects/libnvme -Dlibdbus=disabled -Dopenssl=disabled -Dbuildtype=release -Dprefix=/usr -Dpython=enabled - ninja -C builddir - sudo meson install -C builddir + sudo apt-get install --yes --quiet python3-pip cmake libgirepository1.0-dev libsystemd-dev python3-systemd swig libjson-c-dev || true + sudo python3 -m pip install --upgrade pip wheel meson ninja + python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject lxml pyudev + + - name: "BUILD: [libnvme, nvme-stas]" + uses: BSFishy/meson-build@v1.0.3 + with: + action: build + directory: .build + setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -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 - name: Set PYTHONPATH run: | - echo "PYTHONPATH=builddir:builddir/subprojects/libnvme:/usr/lib/python3/dist-packages/" >> $GITHUB_ENV + echo "PYTHONPATH=.build:.build/subprojects/libnvme:/usr/lib/python3/dist-packages" >> $GITHUB_ENV - name: Show test environment run: | - echo -e "Build Directory:\n$(ls -laF builddir)" + echo -e "Build Directory:\n$(ls -laF .build)" python3 -VV python3 -m site python3 -m pylint --version @@ -82,12 +64,12 @@ jobs: - name: Pylint run: | - python3 -m pylint --rcfile=test/pylint.rc *.py staslib + python3 -m pylint -j 0 --rcfile=test/pylint.rc .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib - name: Pyflakes if: always() run: | - python3 -m pyflakes *.py staslib + python3 -m pyflakes .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib python-black: if: ${{ !github.event.act }} # skip during local actions testing |