diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb338ab..b9b97de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ stages: - meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR" - ninja -C build install - popd - - $PYTHON -m build + - $PYTHON -m build -n -x - $PYTHON -m venv test-venv --system-site-packages --symlinks - test-venv/bin/python -m pip install dist/libvirt_python*.whl - test-venv/bin/python -m pytest tests @@ -44,7 +44,25 @@ stages: script: - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" - export CFLAGS="-Werror" - - $PYTHON -m build + - $PYTHON -m build -n -x + - $PYTHON -m venv test-venv --system-site-packages --symlinks + - test-venv/bin/python -m pip install dist/libvirt_python*.whl + - test-venv/bin/python -m pytest tests + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; + then + unset CFLAGS ; + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ; + mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ; + fi + +.native_setuppy_build_job: + extends: + - .gitlab_native_build_job + script: + - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" + - export CFLAGS="-Werror" + - $PYTHON setup.py bdist_wheel + - $PYTHON setup.py sdist - $PYTHON -m venv test-venv --system-site-packages --symlinks - test-venv/bin/python -m pip install dist/libvirt_python*.whl - test-venv/bin/python -m pytest tests diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 1c4ed75..c075b57 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -8,7 +8,7 @@ # Native build jobs x86_64-centos-stream-8: - extends: .native_build_job + extends: .native_setuppy_build_job needs: - job: x86_64-centos-stream-8-container optional: true diff --git a/ci/manifest.yml b/ci/manifest.yml index f6d4167..bd5f1da 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -11,6 +11,7 @@ targets: centos-stream-8: jobs: - arch: x86_64 + template: .native_setuppy_build_job artifacts: expire_in: 1 hour paths: