Skip to content

Commit c424eff

Browse files
authored
Merge pull request #907 from DeusData/fix/smoke-arch-from-ci
fix(smoke): derive arch from CI matrix, not emulated uname (arm64 12a)
2 parents 955f0cc + 73a636f commit c424eff

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/_smoke.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ jobs:
235235
run: scripts/smoke-test.sh ./codebase-memory-mcp.exe
236236
env:
237237
SMOKE_DOWNLOAD_URL: http://127.0.0.1:18080
238+
SMOKE_ARCH: ${{ matrix.arch }}
238239

239240
- name: Security audits
240241
shell: msys2 {0}

scripts/smoke-test.sh

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,18 +1570,26 @@ DL_OS=$(uname -s | tr 'A-Z' 'a-z')
15701570
case "$DL_OS" in
15711571
mingw*|msys*) DL_OS="windows" ;;
15721572
esac
1573-
DL_ARCH=$(uname -m)
1574-
case "$DL_ARCH" in
1575-
aarch64) DL_ARCH="arm64" ;;
1576-
x86_64)
1577-
# Rosetta detection
1578-
if [ "$DL_OS" = "darwin" ] && sysctl -n machdep.cpu.brand_string 2>/dev/null | grep -qi apple; then
1579-
DL_ARCH="arm64"
1580-
else
1581-
DL_ARCH="amd64"
1582-
fi
1583-
;;
1584-
esac
1573+
# Prefer a CI-provided SMOKE_ARCH over `uname -m`: on windows-11-arm the base
1574+
# MSYS2 `uname` is an emulated x86_64 binary that reports "x86_64", so uname would
1575+
# request the amd64 archive and 404. The smoke workflow passes the true matrix
1576+
# arch (arm64/amd64). Fall back to uname when SMOKE_ARCH is unset (local runs).
1577+
if [ -n "${SMOKE_ARCH:-}" ]; then
1578+
DL_ARCH="$SMOKE_ARCH"
1579+
else
1580+
DL_ARCH=$(uname -m)
1581+
case "$DL_ARCH" in
1582+
aarch64) DL_ARCH="arm64" ;;
1583+
x86_64)
1584+
# Rosetta detection
1585+
if [ "$DL_OS" = "darwin" ] && sysctl -n machdep.cpu.brand_string 2>/dev/null | grep -qi apple; then
1586+
DL_ARCH="arm64"
1587+
else
1588+
DL_ARCH="amd64"
1589+
fi
1590+
;;
1591+
esac
1592+
fi
15851593

15861594
if [ "$DL_OS" = "darwin" ] || [ "$DL_OS" = "linux" ]; then
15871595
DL_EXT="tar.gz"

0 commit comments

Comments
 (0)