zed/crates/eval_cli/zed_eval/install.sh.j2
Ben Brandt 2457e27437
eval: Add eval_cli crate (#50922)
Very much wip

Release Notes:

- N/A
2026-03-06 11:12:38 +00:00

49 lines
1.5 KiB
Django/Jinja

#!/bin/bash
set -euo pipefail
# Install runtime dependencies needed by the eval-cli binary (dynamically linked
# against glibc + these shared libraries from its GPUI/terminal/language stacks).
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
libasound2 \
libfontconfig1 \
libglib2.0-0 \
libsqlite3-0 \
libssl3 \
libwayland-client0 \
libx11-xcb1 \
libxkbcommon-x11-0 \
libzstd1
# Install Node.js 22 LTS (needed by language servers like basedpyright).
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y --no-install-recommends nodejs
# Install uv (needed for running Python tests in SWE-bench tasks).
curl -LsSf https://astral.sh/uv/install.sh | sh
. "$HOME/.local/bin/env"
ln -sf "$HOME/.local/bin/uv" /usr/local/bin/uv
ln -sf "$HOME/.local/bin/uvx" /usr/local/bin/uvx
{% if binary_uploaded is defined %}
# Binary was uploaded directly via setup() — just verify it works.
eval-cli --help
{% elif download_url is defined %}
curl -fsSL "{{ download_url }}" -o /usr/local/bin/eval-cli
chmod +x /usr/local/bin/eval-cli
eval-cli --help
{% else %}
echo "ERROR: No eval-cli binary provided."
echo ""
echo "Either pass binary_path= to upload a local build:"
echo " --ae binary_path=/path/to/target/release/eval-cli"
echo ""
echo "Or set download_url= / EVAL_CLI_DOWNLOAD_URL:"
echo " --ae download_url=https://example.com/eval-cli"
exit 1
{% endif %}
echo "INSTALL_SUCCESS"