mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-08 06:04:10 +00:00
fix: resolve doubled toolchain path in CI build
The find command on cache hit returns an absolute path (e.g., /tmp/toolchain/x86-64--musl--stable-2025.08-1), but the PATH/CC lines were prepending /tmp/toolchain/ again, causing /tmp/toolchain//tmp/toolchain/... to fail.
This commit is contained in:
parent
288635adfc
commit
96a1bc9f1f
1 changed files with 3 additions and 3 deletions
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -209,9 +209,9 @@ jobs:
|
||||||
echo "Using cached toolchain: $TOOLCHAIN_DIR"
|
echo "Using cached toolchain: $TOOLCHAIN_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH="$(realpath "/tmp/toolchain/$TOOLCHAIN_DIR")/bin:$PATH"
|
export PATH="$(realpath "$TOOLCHAIN_DIR")/bin:$PATH"
|
||||||
export CC=$(realpath "$(find "/tmp/toolchain/$TOOLCHAIN_DIR/bin" -name '*-gcc.br_real' -type f -executable | head -n1)")
|
export CC=$(realpath "$(find "$TOOLCHAIN_DIR/bin" -name '*-gcc.br_real' -type f -executable | head -n1)")
|
||||||
[ -z "$CC" ] && { echo "No gcc.br_real found in /tmp/toolchain/$TOOLCHAIN_DIR/bin" >&2; exit 1; }
|
[ -z "$CC" ] && { echo "No gcc.br_real found in $TOOLCHAIN_DIR/bin" >&2; exit 1; }
|
||||||
go build -ldflags "-w -s -linkmode external -extldflags '-static'" -o xui-release -v main.go
|
go build -ldflags "-w -s -linkmode external -extldflags '-static'" -o xui-release -v main.go
|
||||||
file xui-release
|
file xui-release
|
||||||
ldd xui-release || echo "Static binary confirmed"
|
ldd xui-release || echo "Static binary confirmed"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue