mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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:
parent
4e93a9802d
commit
ef136c6a89
4 changed files with 18 additions and 2 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue