[PATCH] CI: collect certain intermediate files as artifacts (part 2)

Jan Beulich posted 1 patch 3 days, 13 hours ago
Failed in applying to current master (apply log)
[PATCH] CI: collect certain intermediate files as artifacts (part 2)
Posted by Jan Beulich 3 days, 13 hours ago
Build issues may also surface for analysis jobs. Collect intermediate
files (if any) there as well. Include xen/.config too, since it's not
otherwise collected.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2536905486

--- a/automation/eclair_analysis/build.sh
+++ b/automation/eclair_analysis/build.sh
@@ -58,10 +58,21 @@ runtime_failures_docs() {
 (
   runtime_failures_docs
 
+  ret=0
+  mkdir -p intermediates
   make "-j${PROCESSORS}" "-l${PROCESSORS}.0"    \
        "CROSS_COMPILE=${CROSS_COMPILE}"         \
        "CC=${CC}"                               \
        "CXX=${CXX}"                             \
        "XEN_TARGET_ARCH=${XEN_TARGET_ARCH}"     \
-       -C xen
+       -C xen || ret=$?
+
+  # Preserve Xen intermediate files.  Some may be there only upon build failure.
+  for f in xen/.config xen/.xen-syms.* xen/.xen.efi.*; do
+      if [[ -f $f ]]; then
+          cp $f intermediates/
+      fi
+  done
+
+  exit $ret
 )
--- a/automation/gitlab-ci/analyze.yaml
+++ b/automation/gitlab-ci/analyze.yaml
@@ -18,6 +18,7 @@
       - "${ECLAIR_OUTPUT_DIR}/*.txt"
       - '*.log'
       - '*.json'
+      - intermediates/
     reports:
       codequality: gl-code-quality-report.json
   rules:
Re: [PATCH] CI: collect certain intermediate files as artifacts (part 2)
Posted by Stefano Stabellini 2 days ago
On Wed, 20 May 2026, Jan Beulich wrote:
> Build issues may also surface for analysis jobs. Collect intermediate
> files (if any) there as well. Include xen/.config too, since it's not
> otherwise collected.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
> https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2536905486
> 
> --- a/automation/eclair_analysis/build.sh
> +++ b/automation/eclair_analysis/build.sh
> @@ -58,10 +58,21 @@ runtime_failures_docs() {
>  (
>    runtime_failures_docs
>  
> +  ret=0
> +  mkdir -p intermediates
>    make "-j${PROCESSORS}" "-l${PROCESSORS}.0"    \
>         "CROSS_COMPILE=${CROSS_COMPILE}"         \
>         "CC=${CC}"                               \
>         "CXX=${CXX}"                             \
>         "XEN_TARGET_ARCH=${XEN_TARGET_ARCH}"     \
> -       -C xen
> +       -C xen || ret=$?
> +
> +  # Preserve Xen intermediate files.  Some may be there only upon build failure.
> +  for f in xen/.config xen/.xen-syms.* xen/.xen.efi.*; do
> +      if [[ -f $f ]]; then
> +          cp $f intermediates/
> +      fi
> +  done
> +
> +  exit $ret
>  )
> --- a/automation/gitlab-ci/analyze.yaml
> +++ b/automation/gitlab-ci/analyze.yaml
> @@ -18,6 +18,7 @@
>        - "${ECLAIR_OUTPUT_DIR}/*.txt"
>        - '*.log'
>        - '*.json'
> +      - intermediates/
>      reports:
>        codequality: gl-code-quality-report.json
>    rules:
>