Skip to content

Commit 05691fe

Browse files
committed
maybe fix ubuntu zig download
1 parent 886927e commit 05691fe

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.github/workflows/setup-zig-linux.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@ set -e
33

44
# Download and setup Zig for Linux x86_64
55
ZIG_VERSION="${ZIG_VERSION:-0.14.1}"
6-
ZIG_URL="https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz"
7-
ZIG_DIR="$(pwd)/zig-linux-x86_64-${ZIG_VERSION}"
8-
ZIG_ARCHIVE="zig-linux-x86_64-${ZIG_VERSION}.tar.xz"
6+
ZIG_URL="https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz"
7+
ZIG_DIR="$(pwd)/zig-x86_64-linux-${ZIG_VERSION}"
8+
ZIG_ARCHIVE="zig-x86_64-linux-${ZIG_VERSION}.tar.xz"
99

10-
echo "Downloading Zig ${ZIG_VERSION}..."
11-
curl -L -o "${ZIG_ARCHIVE}" "${ZIG_URL}"
10+
echo "Downloading Zig ${ZIG_VERSION} from ${ZIG_URL}..."
11+
curl -fSL -o "${ZIG_ARCHIVE}" "${ZIG_URL}"
12+
13+
if [ ! -f "${ZIG_ARCHIVE}" ]; then
14+
echo "Error: Failed to download Zig archive"
15+
exit 1
16+
fi
17+
18+
FILE_SIZE=$(stat -c%s "${ZIG_ARCHIVE}" 2>/dev/null || stat -f%z "${ZIG_ARCHIVE}" 2>/dev/null || echo 0)
19+
if [ "$FILE_SIZE" -lt 1000000 ]; then
20+
echo "Error: Downloaded file is too small (${FILE_SIZE} bytes). Download may have failed."
21+
echo "Content of downloaded file:"
22+
head -c 500 "${ZIG_ARCHIVE}"
23+
exit 1
24+
fi
1225

1326
echo "Extracting Zig..."
1427
tar xf "${ZIG_ARCHIVE}"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.1",
44
"description": "Native WebGPU implementation for Bun runtime",
55
"repository": {
6-
"type": "git",
6+
"type": "git",
77
"url": "https://github.com/sst/bun-webgpu"
88
},
99
"homepage": "https://github.com/sst/bun-webgpu",

0 commit comments

Comments
 (0)