Fix the local build of the dependencies image, including the debug image instructions (#1229)

* Fix the local build of the dependencies image, including the debug image instructions

* Make the deps image easily runnable

* improve readme

* Better caching strategy

* make dependency from IM to libs build stages

* fix missing folder error

* Hopefully, final solution

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2025-06-29 22:41:17 +03:00
committed by GitHub
parent 0192e4e640
commit fafa3a3d64
9 changed files with 41 additions and 24 deletions

View File

@@ -1,14 +1,15 @@
#!/bin/bash
set -euo pipefail
# Fallback to the latest version if LIBRAW_VERSION is not set
if [[ -z "$LIBRAW_VERSION" ]]; then
if [[ -z "${LIBRAW_VERSION}" ]]; then
echo "WARN: LibRaw version is empty, most likely the script runs not on CI."
echo "Fetching the latest version from LibRaw repo..."
LIBRAW_VERSION=$(curl -fsSL --retry 2 --retry-delay 5 --retry-max-time 60 \
"https://api.github.com/repos/LibRaw/LibRaw/releases/latest" | jq -r '.tag_name')
fi
set -euo pipefail
: "${DEB_HOST_MULTIARCH:=$(uname -m)-linux-gnu}"
: "${DEB_HOST_ARCH:=$(dpkg --print-architecture)}"
CACHE_DIR="${BUILD_CACHE_DIR:-/build-cache}/LibRaw-${LIBRAW_VERSION}"
@@ -26,7 +27,7 @@ echo "Building LibRaw ${LIBRAW_VERSION} (cache miss)..."
echo Compiler: "${DEB_HOST_MULTIARCH}" Arch: "${DEB_HOST_ARCH}"
apt-get install -y --no-install-recommends \
apt-get install -y \
libjpeg62-turbo-dev:"${DEB_HOST_ARCH}" \
liblcms2-dev:"${DEB_HOST_ARCH}" \
zlib1g-dev:"${DEB_HOST_ARCH}"