Skip to content

Commit c64d302

Browse files
committed
Increase memory usage
1 parent 551f3de commit c64d302

2 files changed

Lines changed: 44 additions & 7 deletions

File tree

.github/workflows/wasm.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ jobs:
2020
# For WASM, we must build tests separately and run them with a WASM runtime.
2121
# See: https://book.swiftwasm.org/getting-started/testing.html
2222
- name: Install Wasmtime
23-
run: |
24-
curl https://wasmtime.dev/install.sh -sSf | bash
25-
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
23+
uses: bytecodealliance/actions/wasmtime/setup@v1
24+
with:
25+
version: "29.0.1"
26+
github_token: ${{ github.token }}
2627

2728
- name: Build and Test
2829
run: ./scripts/build-and-test-wasm.sh

scripts/build-and-test-wasm.sh

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,47 @@ install_wasmtime() {
9999
echo "🔧 Checking wasmtime..."
100100
if command -v wasmtime &> /dev/null; then
101101
echo "✅ wasmtime already installed: $(wasmtime --version)"
102+
return 0
103+
fi
104+
105+
echo "⬇️ Installing wasmtime..."
106+
107+
# Pinned version to avoid issues with dynamic version fetching
108+
# The wasmtime.dev/install.sh script can fail when GitHub API rate limits
109+
# cause the version to be parsed incorrectly (e.g., returning '{' as version)
110+
WASMTIME_VERSION="29.0.1"
111+
112+
# Detect platform
113+
case "$(uname -s)" in
114+
Linux)
115+
WASMTIME_ARCH="x86_64-linux"
116+
;;
117+
Darwin)
118+
if [ "$(uname -m)" = "arm64" ]; then
119+
WASMTIME_ARCH="aarch64-macos"
120+
else
121+
WASMTIME_ARCH="x86_64-macos"
122+
fi
123+
;;
124+
*)
125+
echo "❌ Unsupported platform: $(uname -s)"
126+
exit 1
127+
;;
128+
esac
129+
130+
WASMTIME_URL="https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_ARCH}.tar.xz"
131+
WASMTIME_DIR="$HOME/.wasmtime"
132+
133+
echo " Downloading from: $WASMTIME_URL"
134+
mkdir -p "$WASMTIME_DIR/bin"
135+
curl -L "$WASMTIME_URL" | tar -xJ --strip-components=1 -C "$WASMTIME_DIR"
136+
export PATH="$WASMTIME_DIR/bin:$PATH"
137+
138+
if command -v wasmtime &> /dev/null; then
139+
echo "✅ wasmtime installed successfully: $(wasmtime --version)"
102140
else
103-
echo "⬇️ Installing wasmtime..."
104-
curl https://wasmtime.dev/install.sh -sSf | bash
105-
export PATH="$HOME/.wasmtime/bin:$PATH"
106-
echo "✅ wasmtime installed successfully"
141+
echo "❌ Failed to install wasmtime"
142+
exit 1
107143
fi
108144
echo ""
109145
}

0 commit comments

Comments
 (0)