mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-10-18 06:09:15 +00:00
Correctly identify the platform during the build.
This commit is contained in:
+14
-5
@@ -4,11 +4,20 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Detect OS
|
# Detect host OS for platform-specific setup (Windows needs SQLite)
|
||||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
HOST_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
|
# Determine target platform for ONNX library download
|
||||||
|
# Use TARGET_GOOS/TARGET_GOARCH from CI matrix if available, otherwise auto-detect
|
||||||
|
if [ -n "$TARGET_GOOS" ] && [ -n "$TARGET_GOARCH" ]; then
|
||||||
|
ONNX_PLATFORM="${TARGET_GOOS}-${TARGET_GOARCH}"
|
||||||
|
echo "Target platform from CI matrix: $ONNX_PLATFORM"
|
||||||
|
else
|
||||||
|
ONNX_PLATFORM="auto"
|
||||||
|
fi
|
||||||
|
|
||||||
# On Windows, install SQLite development headers for CGO
|
# On Windows, install SQLite development headers for CGO
|
||||||
if [[ "$OS" == mingw* ]] || [[ "$OS" == msys* ]] || [[ "$OS" == cygwin* ]]; then
|
if [[ "$HOST_OS" == mingw* ]] || [[ "$HOST_OS" == msys* ]] || [[ "$HOST_OS" == cygwin* ]]; then
|
||||||
echo "Installing SQLite for Windows..."
|
echo "Installing SQLite for Windows..."
|
||||||
|
|
||||||
# Download SQLite amalgamation and set up for CGO
|
# Download SQLite amalgamation and set up for CGO
|
||||||
@@ -42,5 +51,5 @@ if [[ "$OS" == mingw* ]] || [[ "$OS" == msys* ]] || [[ "$OS" == cygwin* ]]; then
|
|||||||
echo "SQLite setup complete"
|
echo "SQLite setup complete"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download ONNX runtime libraries for current platform
|
# Download ONNX runtime libraries for target platform
|
||||||
./scripts/download-onnx-libs.sh auto
|
./scripts/download-onnx-libs.sh "$ONNX_PLATFORM"
|
||||||
|
|||||||
Reference in New Issue
Block a user