mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 18:50:18 +01:00
gitlab-ci: merge branch 'th/gitlab-ci-centos'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/170
(cherry picked from commit 94ccc22d66)
This commit is contained in:
commit
a05cc0e573
9 changed files with 64 additions and 34 deletions
|
|
@ -10,18 +10,29 @@ stages:
|
|||
|
||||
.fedora_install: &fedora_install
|
||||
before_script:
|
||||
- date '+%Y%m%d-%H%M%S'; NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
|
||||
- date '+%Y%m%d-%H%M%S'; dnf install -y glibc-langpack-pl ccache clang
|
||||
|
||||
# enable EPEL on CentOS
|
||||
- date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || (yum install -y glibc-common && localedef -c -i pl_PL -f UTF-8 pl_PL.UTF-8 && locale -a)
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; NM_INSTALL="yum install -y" ./contrib/fedora/REQUIRED_PACKAGES
|
||||
- date '+%Y%m%d-%H%M%S'; yum install -y glibc-langpack-pl ccache clang which
|
||||
|
||||
# containers have "tsflags=nodocs" in /etc/dnf/dnf.conf. We need /usr/shared/gtk-doc/html
|
||||
# to generate proper documentation.
|
||||
- date '+%Y%m%d-%H%M%S'; dnf reinstall -y --setopt='tsflags=' glib2-doc
|
||||
- date '+%Y%m%d-%H%M%S'; yum reinstall -y --setopt='tsflags=' glib2-doc
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; dnf install -y python3-dnf-plugins-core
|
||||
- date '+%Y%m%d-%H%M%S'; dnf debuginfo-install -y glib2
|
||||
- date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || yum install -y python36-dbus python36-gobject-base
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; ! which dnf || dnf install -y python3-dnf-plugins-core
|
||||
- date '+%Y%m%d-%H%M%S'; ! which dnf || dnf debuginfo-install -y glib2
|
||||
- date '+%Y%m%d-%H%M%S'; which dnf || debuginfo-install -y glib2
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-ci-patch-gtkdoc.sh || true
|
||||
|
||||
- date '+%Y%m%d-%H%M%S'; test -x /usr/bin/ninja || ! test -x /usr/bin/ninja-build || ln -s /usr/bin/ninja-build /usr/bin/ninja
|
||||
|
||||
.debian_install: &debian_install
|
||||
before_script:
|
||||
- date '+%Y%m%d-%H%M%S'; apt-get update
|
||||
|
|
@ -39,22 +50,22 @@ stages:
|
|||
- date '+%Y%m%d-%H%M%S'; locale -a
|
||||
- date '+%Y%m%d-%H%M%S'; env
|
||||
- date '+%Y%m%d-%H%M%S'; meson --version
|
||||
- date '+%Y%m%d-%H%M%S'; ! which dnf || dnf list --installed
|
||||
- date '+%Y%m%d-%H%M%S'; ! which dpkg || dpkg -l
|
||||
- date '+%Y%m%d-%H%M%S'; ! which yum || yum list installed
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
|
||||
- date '+%Y%m%d-%H%M%S'; rm -rf /tmp/nm-docs-html; mv build/INST/share/gtk-doc/html /tmp/nm-docs-html
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=.*\(Fedora\|CentOS\)' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=.*\(Fedora\)' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; test "$NM_BUILD_TARBALL" != 1 || ( ./contrib/fedora/rpm/build_clean.sh -r && mv ./NetworkManager-1*.tar.xz /tmp/ && mv ./contrib/fedora/rpm/latest/SRPMS/NetworkManager-1*.src.rpm /tmp/ )
|
||||
- date '+%Y%m%d-%H%M%S'; git clean -fdx
|
||||
- date '+%Y%m%d-%H%M%S'; mv /tmp/nm-docs-html ./docs-html
|
||||
- date '+%Y%m%d-%H%M%S'; test "$NM_BUILD_TARBALL" != 1 || mv /tmp/NetworkManager-1*.tar.xz /tmp/NetworkManager-1*.src.rpm ./
|
||||
|
||||
checkpatch:
|
||||
image: fedora:28
|
||||
image: fedora:29
|
||||
stage: test
|
||||
script:
|
||||
- date '+%Y%m%d-%H%M%S'; dnf install -y git
|
||||
|
|
@ -95,6 +106,17 @@ t_fedora:rawhide:
|
|||
allow_failure: true
|
||||
when: manual
|
||||
|
||||
t_centos:7.5.1804:
|
||||
<<: *fedora_install
|
||||
image: centos:7.5.1804
|
||||
<<: *do_build
|
||||
when: manual
|
||||
|
||||
t_centos:7.6.1810:
|
||||
<<: *fedora_install
|
||||
image: centos:7.6.1810
|
||||
<<: *do_build
|
||||
|
||||
t_ubuntu:16.04:
|
||||
<<: *debian_install
|
||||
image: ubuntu:16.04
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ class NMStubServer:
|
|||
nmobj = self._conn_get_main_object(self._conn)
|
||||
if nmobj is not None:
|
||||
break
|
||||
if (NM.utils_get_timestamp_msec() - start) >= 2000:
|
||||
if (NM.utils_get_timestamp_msec() - start) >= 4000:
|
||||
p.stdin.close()
|
||||
p.kill()
|
||||
Util.popen_wait(p, 1000)
|
||||
|
|
|
|||
|
|
@ -53,8 +53,10 @@ install \
|
|||
newt-devel \
|
||||
nss-devel \
|
||||
polkit-devel \
|
||||
ppp \
|
||||
ppp-devel \
|
||||
pygobject3-base \
|
||||
python-gobject-base \
|
||||
python3-dbus \
|
||||
python3-gobject \
|
||||
qt-devel \
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ _print_test_logs() {
|
|||
echo ">>>> PRINT TEST LOGS $1 (done)"
|
||||
if _with_valgrind; then
|
||||
echo ">>>> PRINT VALGRIND LOGS $1 (start)"
|
||||
find -name '*.valgrind-log' -print0 | xargs -0 grep -H ^
|
||||
find -name '*.valgrind-log' -print0 | xargs -0 grep -H ^ || true
|
||||
echo ">>>> PRINT VALGRIND LOGS $1 (done)"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
|||
-Wno-missing-field-initializers \
|
||||
-Wno-pragmas \
|
||||
-Wno-sign-compare \
|
||||
-Wno-unknown-pragmas \
|
||||
-Wno-unused-parameter \
|
||||
; do
|
||||
dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning)
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ if nm_debug
|
|||
'-Wno-missing-field-initializers',
|
||||
'-Wno-pragmas',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-unknown-pragmas',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wparentheses-equality',
|
||||
'-Wpointer-arith',
|
||||
|
|
|
|||
|
|
@ -635,7 +635,11 @@ NM_G_ERROR_MSG (GError *error)
|
|||
* It's useful to check the let the compiler ensure that @value is
|
||||
* of a certain type. */
|
||||
#define _NM_ENSURE_TYPE(type, value) (_Generic ((value), type: (value)))
|
||||
#define _NM_ENSURE_TYPE_CONST(type, value) (_Generic ((value), const type: ((const type) (value)), type: ((const type) (value))))
|
||||
#define _NM_ENSURE_TYPE_CONST(type, value) (_Generic ((value), \
|
||||
const type : ((const type) (value)), \
|
||||
const type const: ((const type) (value)), \
|
||||
type : ((const type) (value)), \
|
||||
type const: ((const type) (value))))
|
||||
#else
|
||||
#define _NM_ENSURE_TYPE(type, value) (value)
|
||||
#define _NM_ENSURE_TYPE_CONST(type, value) ((const type) (value))
|
||||
|
|
|
|||
|
|
@ -917,28 +917,28 @@ extern volatile int _nm_platform_kernel_support_state[_NM_PLATFORM_KERNEL_SUPPOR
|
|||
int _nm_platform_kernel_support_init (NMPlatformKernelSupportType type,
|
||||
int value);
|
||||
|
||||
#define _nm_platform_kernel_support_detected(type) \
|
||||
G_LIKELY (({ \
|
||||
const NMPlatformKernelSupportType _type = (type); \
|
||||
\
|
||||
nm_assert (_NM_INT_NOT_NEGATIVE (_type) && _type < G_N_ELEMENTS (_nm_platform_kernel_support_state)); \
|
||||
\
|
||||
(_nm_platform_kernel_support_state[_type] != 0); \
|
||||
}))
|
||||
static inline gboolean
|
||||
_nm_platform_kernel_support_detected (NMPlatformKernelSupportType type)
|
||||
{
|
||||
nm_assert ( _NM_INT_NOT_NEGATIVE (type)
|
||||
&& type < G_N_ELEMENTS (_nm_platform_kernel_support_state));
|
||||
|
||||
#define nm_platform_kernel_support_get(type) \
|
||||
({ \
|
||||
const NMPlatformKernelSupportType _type = (type); \
|
||||
int _v; \
|
||||
\
|
||||
nm_assert (_NM_INT_NOT_NEGATIVE (_type) && _type < G_N_ELEMENTS (_nm_platform_kernel_support_state)); \
|
||||
\
|
||||
_v = _nm_platform_kernel_support_state[_type]; \
|
||||
if (G_UNLIKELY (_v == 0)) \
|
||||
_v = _nm_platform_kernel_support_init (_type, 0); \
|
||||
\
|
||||
(_v >= 0); \
|
||||
})
|
||||
return G_LIKELY (_nm_platform_kernel_support_state[type] != 0);
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
nm_platform_kernel_support_get (NMPlatformKernelSupportType type)
|
||||
{
|
||||
int v;
|
||||
|
||||
nm_assert (_NM_INT_NOT_NEGATIVE (type)
|
||||
&& type < G_N_ELEMENTS (_nm_platform_kernel_support_state));
|
||||
|
||||
v = _nm_platform_kernel_support_state[type];
|
||||
if (G_UNLIKELY (v == 0))
|
||||
v = _nm_platform_kernel_support_init (type, 0);
|
||||
return (v >= 0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ _idx_obj_part (const DedupMultiIdxType *idx_type,
|
|||
if (h) {
|
||||
nm_hash_update_vals (h,
|
||||
idx_type->cache_id_type,
|
||||
NMP_OBJECT_CAST_OBJ_WITH_IFINDEX (obj_a)->ifindex);
|
||||
obj_a->obj_with_ifindex.ifindex);
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue