mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 07:55:06 +03:00
697b7727d0
Setting CFLAGS before invoking rpm-build causes replacement of the CFLAGS that RPM wants to set for python. This causes the loss of certain flags needed to turn on debug output and optimization. Previously this wasn't a problem as something in setuptools appears to have been adding -g anyway, but with the update to python 3.12 this now fully breaks. We should never have been setting CFLAGS during the RPM build so we drop it unconditionally for all distros. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
|
|
stages:
|
|
- containers
|
|
- builds
|
|
- sanity_checks
|
|
|
|
.git_build_vars: &git_build_vars |
|
|
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
|
|
export SCRATCH_DIR="$PWD/scratch"
|
|
export VROOT="$SCRATCH_DIR/vroot"
|
|
export LIBDIR="$VROOT/lib"
|
|
export LD_LIBRARY_PATH="$LIBDIR"
|
|
export PATH="$VROOT/bin:$PATH"
|
|
export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
|
|
export CFLAGS="-Werror"
|
|
|
|
.native_git_build_job:
|
|
script:
|
|
- *git_build_vars
|
|
- pushd "$PWD"
|
|
- mkdir -p "$SCRATCH_DIR"
|
|
- cd "$SCRATCH_DIR"
|
|
- git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
|
|
- cd libvirt
|
|
- meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR"
|
|
- ninja -C build install
|
|
- popd
|
|
- $PYTHON -m build
|
|
- $PYTHON -m pip ${PIP_INSTALL:-install} dist/libvirt_python*.whl
|
|
- $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_git_build_job_prebuilt_env:
|
|
extends:
|
|
- .native_git_build_job
|
|
- .gitlab_native_build_job_prebuilt_env
|
|
|
|
.native_git_build_job_local_env:
|
|
extends:
|
|
- .native_git_build_job
|
|
- .gitlab_native_build_job_local_env
|
|
|
|
.native_build_job:
|
|
script:
|
|
- export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
|
|
- export CFLAGS="-Werror"
|
|
- $PYTHON -m build
|
|
- $PYTHON -m pip ${PIP_INSTALL:-install} dist/libvirt_python*.whl
|
|
- $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_build_job_prebuilt_env:
|
|
extends:
|
|
- .native_build_job
|
|
- .gitlab_native_build_job_prebuilt_env
|
|
|
|
.native_build_job_local_env:
|
|
extends:
|
|
- .native_build_job
|
|
- .gitlab_native_build_job_local_env
|
|
|
|
include: '/ci/gitlab.yml'
|
|
|
|
.api_coverage_job:
|
|
stage: sanity_checks
|
|
script:
|
|
- *git_build_vars
|
|
- $PYTHON -m pip ${PIP_INSTALL:-install} dist/libvirt_python*.whl
|
|
- LIBVIRT_API_COVERAGE=1 $PYTHON -m pytest tests
|
|
allow_failure: true
|
|
|
|
api_coverage_prebuilt_env:
|
|
extends:
|
|
- .gitlab_native_build_job_prebuilt_env
|
|
- .api_coverage_job
|
|
needs:
|
|
- job: x86_64-centos-stream-8-git-prebuilt-env
|
|
artifacts: true
|
|
variables:
|
|
NAME: centos-stream-8
|
|
|
|
api_coverage_local_env:
|
|
extends:
|
|
- .gitlab_native_build_job_local_env
|
|
- .api_coverage_job
|
|
needs:
|
|
- job: x86_64-centos-stream-8-git-local-env
|
|
artifacts: true
|
|
variables:
|
|
IMAGE: quay.io/centos/centos:stream8
|
|
NAME: centos-stream-8
|