ci: annotate cross-compilation dependency failures

When cross-compile dependency packages cannot be installed, emit
a ::error:: annotation so that the failure reason is visible in
the GitHub Actions summary. Use \r to ensure the annotation is
recognized even inside Docker BuildKit output which prefixes
each line with step and timing information.

Assisted-by: Claude Code (claude-opus-4-6)
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2026-07-09 08:39:22 +00:00 committed by Radostin Stoyanov
parent 4e93a9802d
commit ef136c6a89
4 changed files with 18 additions and 2 deletions

View file

@ -163,6 +163,7 @@ jobs:
- name: Run Cross Compilation Targets
run: >
sudo make -C scripts/ci ${{ matrix.target }}
BUILD_OPTIONS="--build-arg CI_CROSS_COMPILE=1"
docker-test:
needs: [alpine-test]

View file

@ -6,7 +6,7 @@ if [ ! -x "$APT_INSTALL" ]; then
exit 1
fi
"$APT_INSTALL" \
if ! "$APT_INSTALL" \
crossbuild-essential-"${DEBIAN_ARCH}" \
iproute2:"${DEBIAN_ARCH}" \
libaio-dev:"${DEBIAN_ARCH}" \
@ -34,4 +34,13 @@ fi
git \
protobuf-c-compiler \
protobuf-compiler \
python3-protobuf
python3-protobuf; then
if [ -n "$CI_CROSS_COMPILE" ]; then
# Use \r to move cursor to the start of the line so that
# ::error:: is recognized by GitHub Actions even when
# running inside a Docker build where BuildKit prefixes
# each line with step and timing information.
printf '\r::error::Cross-compile dependency installation failed for %s\n' "${DEBIAN_ARCH}"
fi
exit 1
fi

View file

@ -15,6 +15,9 @@ ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
PKG_CONFIG_PATH=/usr/lib/${CROSS_TRIPLET}/pkgconfig
ARG CI_CROSS_COMPILE
ENV CI_CROSS_COMPILE=${CI_CROSS_COMPILE}
COPY contrib/dependencies/apt-cross-packages.sh /criu/contrib/dependencies/apt-cross-packages.sh
COPY contrib/apt-install /criu/contrib/apt-install
WORKDIR /criu

View file

@ -15,6 +15,9 @@ ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
PKG_CONFIG_PATH=/usr/lib/${CROSS_TRIPLET}/pkgconfig
ARG CI_CROSS_COMPILE
ENV CI_CROSS_COMPILE=${CI_CROSS_COMPILE}
COPY contrib/dependencies/apt-cross-packages.sh /criu/contrib/dependencies/apt-cross-packages.sh
COPY contrib/apt-install /criu/contrib/apt-install
WORKDIR /criu