From 41034b6947d4f454450474db3ceb7f0da63bc55f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 5 Sep 2022 12:42:58 +0100 Subject: CI: Collect build and test logs Signed-off-by: Simon McVittie --- .gitignore | 1 + .gitlab-ci.yml | 21 ++++++++++++++++++--- tools/ci-build.sh | 15 +++++++-------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 8d80ea7..eaf239d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ .deps/ .dirstamp .libs/ +/_autotools/ /INSTALL /aclocal.m4 /api/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38ce8ce..2cec82e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,15 +37,24 @@ variables: ci_distro: "debian" ci_suite: "bookworm" +.common: + script: &script + - chown -R user . + - runuser -u user -- env PATH="/usr/lib/ccache:$PATH" ./tools/ci-build.sh $dbus_ci_configure_flags + artifacts: &artifacts + paths: + - _autotools/*.log + - _meson-build/meson-logs/*.txt + when: always + build:python3.5: stage: build image: "debian:stretch-slim" variables: ci_suite: stretch dbus_ci_system_python: python3 - script: &script - - chown -R user . - - runuser -u user -- env PATH="/usr/lib/ccache:$PATH" ./tools/ci-build.sh $dbus_ci_configure_flags + script: *script + artifacts: *artifacts build:python3.5-dbg: stage: build @@ -62,6 +71,7 @@ build:python3.7: ci_suite: buster dbus_ci_system_python: python3 script: *script + artifacts: *artifacts build:python3.7-dbg: stage: build @@ -70,6 +80,7 @@ build:python3.7-dbg: ci_suite: buster dbus_ci_system_python: python3-dbg script: *script + artifacts: *artifacts build:python3.9: stage: build @@ -78,6 +89,7 @@ build:python3.9: ci_suite: bullseye dbus_ci_system_python: python3.9 script: *script + artifacts: *artifacts build:python3.9-dbg: stage: build @@ -87,6 +99,7 @@ build:python3.9-dbg: dbus_ci_system_python: python3.9-dbg dbus_ci_system_python_module_suffix: -dbg script: *script + artifacts: *artifacts build:python3.10: stage: build @@ -95,6 +108,7 @@ build:python3.10: ci_suite: bookworm dbus_ci_system_python: python3.10 script: *script + artifacts: *artifacts build:python3.10-dbg: stage: build @@ -104,5 +118,6 @@ build:python3.10-dbg: dbus_ci_system_python: python3.10-dbg dbus_ci_system_python_module_suffix: -dbg script: *script + artifacts: *artifacts # vim:set sw=2 sts=2 et: diff --git a/tools/ci-build.sh b/tools/ci-build.sh index a24798a..e372590 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright © 2016 Simon McVittie # @@ -29,7 +29,6 @@ set -x NULL= srcdir="$(pwd)" -builddir="$(mktemp -d -t "builddir.XXXXXX")" prefix="$(mktemp -d -t "prefix.XXXXXX")" if [ -z "$dbus_ci_parallel" ]; then @@ -64,7 +63,7 @@ NOCONFIGURE=1 ./autogen.sh e=0 ( - cd "$builddir" && "${srcdir}/configure" \ + mkdir _autotools && cd _autotools && "${srcdir}/configure" \ --enable-installed-tests \ --prefix="$prefix" \ --with-python-prefix='${prefix}' \ @@ -73,16 +72,16 @@ e=0 ${NULL} ) || e=1 if [ "x$e" != x0 ]; then - cat "$builddir/config.log" + cat "_autotools/config.log" fi test "x$e" = x0 make="make -j${dbus_ci_parallel} V=1 VERBOSE=1" -$make -C "$builddir" -$make -C "$builddir" check -$make -C "$builddir" distcheck -$make -C "$builddir" install +$make -C _autotools +$make -C _autotools check +$make -C _autotools distcheck +$make -C _autotools install ( cd "$prefix" && find . -ls ) dbus_ci_pyversion="$(${PYTHON:-python3} -c 'import sysconfig; print(sysconfig.get_config_var("VERSION"))')" -- cgit v1.2.1