gitlab-ci: test re-buildability of distribution tarballs
Adds tests for making a distribution tarball, and then attempting to build NM from its contents. Files have been left out from the distribution in the past by accident (e.g.75027879
,b2931c96
) and hopefully this test will catch this type of errors. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1862
This commit is contained in:
@@ -57,11 +57,11 @@ variables:
|
|||||||
#
|
#
|
||||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||||
# ".default_tag".
|
# ".default_tag".
|
||||||
ALPINE_TAG: 'tag-7da44bbacc09'
|
ALPINE_TAG: 'tag-947df94197e7'
|
||||||
CENTOS_TAG: 'tag-df11907da86a'
|
CENTOS_TAG: 'tag-2f354aa44865'
|
||||||
DEBIAN_TAG: 'tag-86a16c2d74d8'
|
DEBIAN_TAG: 'tag-fb7953849851'
|
||||||
FEDORA_TAG: 'tag-df11907da86a'
|
FEDORA_TAG: 'tag-2f354aa44865'
|
||||||
UBUNTU_TAG: 'tag-86a16c2d74d8'
|
UBUNTU_TAG: 'tag-fb7953849851'
|
||||||
|
|
||||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||||
@@ -391,6 +391,8 @@ t_fedora:39:
|
|||||||
- meson+clang
|
- meson+clang
|
||||||
- rpm+autotools
|
- rpm+autotools
|
||||||
- rpm+meson
|
- rpm+meson
|
||||||
|
- tarball+autotools
|
||||||
|
- tarball+meson
|
||||||
- tarball
|
- tarball
|
||||||
- subtree
|
- subtree
|
||||||
variables:
|
variables:
|
||||||
|
@@ -157,6 +157,8 @@ t_{{distro.name}}:{{version}}:
|
|||||||
- meson+clang
|
- meson+clang
|
||||||
- rpm+autotools
|
- rpm+autotools
|
||||||
- rpm+meson
|
- rpm+meson
|
||||||
|
- tarball+autotools
|
||||||
|
- tarball+meson
|
||||||
- tarball
|
- tarball
|
||||||
- subtree
|
- subtree
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -63,6 +63,8 @@ check_run_assert() {
|
|||||||
meson+clang
|
meson+clang
|
||||||
rpm+autotools
|
rpm+autotools
|
||||||
rpm+meson
|
rpm+meson
|
||||||
|
tarball+autotools
|
||||||
|
tarball+meson
|
||||||
tarball
|
tarball
|
||||||
subtree
|
subtree
|
||||||
|
|
||||||
@@ -127,6 +129,42 @@ if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
|
|||||||
do_clean
|
do_clean
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if check_run_clean tarball+autotools; then
|
||||||
|
BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
||||||
|
pushd ./build
|
||||||
|
# dist & build with autotools
|
||||||
|
make distcheck -j$(nproc)
|
||||||
|
|
||||||
|
# build with meson
|
||||||
|
DISTSRC="./distsrc-$RANDOM"
|
||||||
|
mkdir $DISTSRC
|
||||||
|
tar xvf ./NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
|
||||||
|
pushd $DISTSRC
|
||||||
|
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
do_clean
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_run_clean tarball+meson; then
|
||||||
|
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
||||||
|
pushd ./build
|
||||||
|
# dist with meson
|
||||||
|
meson dist
|
||||||
|
|
||||||
|
# build with autotools
|
||||||
|
DISTSRC="./distsrc-$RANDOM"
|
||||||
|
mkdir $DISTSRC
|
||||||
|
tar xvf ./meson-dist/NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
|
||||||
|
pushd $DISTSRC
|
||||||
|
BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
|
||||||
|
popd
|
||||||
|
rm -rf $DISTSRC
|
||||||
|
popd
|
||||||
|
do_clean
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
test_subtree() {
|
test_subtree() {
|
||||||
|
@@ -191,6 +191,7 @@ run_autotools() {
|
|||||||
\
|
\
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
if [ "$CONFIGURE_ONLY" != 1 ]; then
|
||||||
make -j 6
|
make -j 6
|
||||||
make install
|
make install
|
||||||
|
|
||||||
@@ -211,6 +212,7 @@ run_autotools() {
|
|||||||
die "autotools+valgrind test failed"
|
die "autotools+valgrind test failed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +224,7 @@ run_meson() {
|
|||||||
else
|
else
|
||||||
_WITH_WERROR_VAL=""
|
_WITH_WERROR_VAL=""
|
||||||
fi
|
fi
|
||||||
meson build \
|
meson setup build \
|
||||||
\
|
\
|
||||||
-Dprefix="$PWD/INST" \
|
-Dprefix="$PWD/INST" \
|
||||||
\
|
\
|
||||||
@@ -262,6 +264,7 @@ run_meson() {
|
|||||||
|
|
||||||
export NM_TEST_CLIENT_CHECK_L10N=1
|
export NM_TEST_CLIENT_CHECK_L10N=1
|
||||||
|
|
||||||
|
if [ "$CONFIGURE_ONLY" != 1 ]; then
|
||||||
ninja -C build -v
|
ninja -C build -v
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
|
|
||||||
@@ -279,6 +282,7 @@ run_meson() {
|
|||||||
die "meson+valgrind test failed"
|
die "meson+valgrind test failed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Reference in New Issue
Block a user