Skip to content

Commit a41c3a7

Browse files
committed
fix: use Bazel-provided wasmtime instead of manual installation
Instead of manually downloading wasmtime, extract and use the wasmtime binary that rules_wasm_component already provides via @wasmtime repository. Benefits: - No duplicate downloads - Version consistency with build tools - Faster CI execution - Reuses Bazel's caching The workflow now: 1. Queries Bazel for the wasmtime binary path 2. Copies it to /usr/local/bin for benchmark scripts 3. Avoids manual download/install overhead This fixes the malformed wasmtime install URL issue and eliminates redundant tooling installation.
1 parent f46372a commit a41c3a7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/performance.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,21 @@ jobs:
7070
brew install hyperfine
7171
fi
7272
73-
# Install wasmtime for runtime benchmarks
74-
curl https://wasmtime.dev/install.sh -sSf | bash
75-
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
73+
# Use wasmtime from rules_wasm_component toolchain (already downloaded by Bazel)
74+
# Extract the binary path from Bazel and copy to PATH
75+
WASMTIME_PATH=$(bazel cquery --output=files @wasmtime//:wasmtime 2>/dev/null | head -1)
76+
77+
if [ -n "$WASMTIME_PATH" ] && [ -f "$WASMTIME_PATH" ]; then
78+
echo "Using Bazel-provided wasmtime from: $WASMTIME_PATH"
79+
sudo cp "$WASMTIME_PATH" /usr/local/bin/wasmtime
80+
sudo chmod +x /usr/local/bin/wasmtime
81+
else
82+
echo "Error: Could not find wasmtime in Bazel cache"
83+
exit 1
84+
fi
85+
86+
# Verify it works
87+
wasmtime --version
7688
7789
- name: Build All Components
7890
run: |

0 commit comments

Comments
 (0)