Skip to content

Commit

Permalink
Add renovate to automate some of the dependencies version updates
Browse files Browse the repository at this point in the history
 - Fix VERSION env var not being propagated to macOS framework creation script
  • Loading branch information
HeavenVolkoff committed Feb 8, 2024
1 parent ae6cbd1 commit faa3533
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

ARG OUT="/opt/out"
ARG TARGET="x86_64-linux-gnu"
ARG VERSION="0.0.0"

# renovate: datasource=github-releases depName=ziglang/zig
ARG ZIG_VERSION="0.11.0"
# renovate: datasource=github-releases depName=mesonbuild/meson
ARG MESON_VERSION="1.3.1"
# renovate: datasource=github-releases depName=Kitware/CMake
ARG CMAKE_VERSION="3.28.3"
# renovate: datasource=github-releases depName=NixOS/patchelf
ARG PATCHELF_VERSION="0.18.0"
# renovate: datasource=github-releases depName=joseluisq/macosx-sdks
ARG MACOS_SDK_VERSION="14.2"

#--
Expand Down Expand Up @@ -505,6 +512,8 @@ RUN find "$OUT" -type d -delete 2>/dev/null || true
RUN find "${OUT}" -type f -exec chmod u+rw,g+r,g-w,o+r,o-w {} +

# Create macOS Frameworks from the built libs (Darwin target only)
ARG VERSION
ENV VERSION="${VERSION:?}"
RUN --mount=type=cache,target=/root/.cache `
--mount=type=bind,source=scripts/create-framework.sh,target=/srv/stage.sh `
/srv/build.sh
Expand Down
5 changes: 4 additions & 1 deletion stages/45-de265.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download de265..."
mkdir -p de265

curl_tar 'https://github.com/strukturag/libde265/archive/refs/tags/v1.0.15.tar.gz' de265 1
# renovate: datasource=github-releases depName=strukturag/libde265
_tag='1.0.15'

curl_tar "https://github.com/strukturag/libde265/archive/refs/tags/v${_tag}.tar.gz" de265 1

case "$TARGET" in
aarch64*)
Expand Down
5 changes: 4 additions & 1 deletion stages/99-heif.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download heif..."
mkdir -p heif

curl_tar 'https://github.com/strukturag/libheif/releases/download/v1.17.6/libheif-1.17.6.tar.gz' heif 1
# renovate: datasource=github-releases depName=strukturag/libheif
_tag='1.17.6'

curl_tar "https://github.com/strukturag/libheif/releases/download/v${_tag}/libheif-${_tag}.tar.gz" heif 1

case "$TARGET" in
*windows*)
Expand Down
7 changes: 4 additions & 3 deletions stages/99-onnx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
echo "Download onnx..."
mkdir -p onnx

_version='1.17.0'
# renovate: datasource=github-releases depName=microsoft/onnxruntime
_tag='1.17.0'

case "$TARGET" in
*windows*)
# We just download the MS pre-compiled binaries which include the DirectML backend and are most likely better optimized than what we can build
curl_tar "https://www.nuget.org/api/v2/package/Microsoft.ML.OnnxRuntime.DirectML/${_version}" onnx 0
curl_tar "https://www.nuget.org/api/v2/package/Microsoft.ML.OnnxRuntime.DirectML/${_tag}" onnx 0

mkdir -p "$OUT"/{bin,lib,include}

Expand All @@ -30,7 +31,7 @@ case "$TARGET" in
;;
esac

curl_tar "https://github.com/microsoft/onnxruntime/archive/refs/tags/v${_version}.tar.gz" onnx 1
curl_tar "https://github.com/microsoft/onnxruntime/archive/refs/tags/v${_tag}.tar.gz" onnx 1

# Patch to only include execinfo.h on supported environments
sed -i 's/defined(__ANDROID__)/defined(__ANDROID__) \&\& (defined(__APPLE__) || defined(__GLIBC__) || defined(PLATFORM_IS_BSD))/g' onnx/onnxruntime/core/platform/posix/stacktrace.cc
Expand Down
1 change: 1 addition & 0 deletions stages/99-pdfium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
echo "Download pdfium..."
mkdir -p pdfium

# renovate: datasource=github-releases depName=bblanchon/pdfium-binaries versioning=semver-coerced
_tag='chromium/6281'
case "$TARGET" in
x86_64-windows*)
Expand Down
1 change: 1 addition & 0 deletions stages/99-protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
echo "Download pdfium..."
mkdir -p pdfium

# renovate: datasource=github-releases depName=protocolbuffers/protobuf
_tag='25.2'
case "$TARGET" in
x86_64-windows*)
Expand Down

0 comments on commit faa3533

Please sign in to comment.