CI: add testlog.txt as build artifacts

That way we will be able to check the logs in the case of failure.
This commit is contained in:
Íñigo Huguet
2024-10-07 08:45:43 +02:00
parent 23ffa5fc6e
commit 0d4c8a235a
3 changed files with 26 additions and 10 deletions

View File

@@ -60,11 +60,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
ALPINE_TAG: 'tag-759073a4a7c5'
CENTOS_TAG: 'tag-8e3ebf909439'
DEBIAN_TAG: 'tag-529c288644bc'
FEDORA_TAG: 'tag-8e3ebf909439'
UBUNTU_TAG: 'tag-529c288644bc'
ALPINE_TAG: 'tag-b7175d703ab5'
CENTOS_TAG: 'tag-60c52d9ef928'
DEBIAN_TAG: 'tag-5b0be38a2514'
FEDORA_TAG: 'tag-60c52d9ef928'
UBUNTU_TAG: 'tag-5b0be38a2514'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
@@ -83,6 +83,7 @@ variables:
- NetworkManager-1*.tar.xz
- NetworkManager-1*.src.rpm
- nm-test.log
- testlog.txt
.nm_artifacts_debug:
artifacts:
@@ -90,6 +91,7 @@ variables:
when: always
paths:
- nm-test.log
- testlog.txt
#################################################################
# #

View File

@@ -88,6 +88,7 @@ variables:
- NetworkManager-1*.tar.xz
- NetworkManager-1*.src.rpm
- nm-test.log
- testlog.txt
.nm_artifacts_debug:
artifacts:
@@ -95,6 +96,7 @@ variables:
when: always
paths:
- nm-test.log
- testlog.txt
#################################################################
# #

View File

@@ -106,22 +106,34 @@ check_run_clean() {
return 0
}
die_with_testlog() {
mv ./build/meson-logs/testlog.txt ./testlog.txt
exit 1
}
if check_run_clean meson+gcc+docs+valgrind ; then
CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh || die_with_testlog
mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
fi
check_run_clean meson+clang && CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
if check_run_clean meson+clang; then
CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh || die_with_testlog
fi
if check_run_clean rpm+meson; then
test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson || die_with_testlog
fi
if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r
SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r || die_with_testlog
mv ./build/meson-dist/NetworkManager-1*.tar.xz "$ARTIFACT_DIR/"
mv ./contrib/fedora/rpm/latest/SRPMS/NetworkManager-1*.src.rpm "$ARTIFACT_DIR/"
do_clean
fi
check_run_clean tarball+meson && CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
if check_run_clean tarball+meson; then
CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh || die_with_testlog
fi
###############################################################################