mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-12 16:16:55 +00:00
fix(tooling): harden internode transport benchmark setup (#3037)
* refactor(config): centralize internode transport constants * fix(bench): guard all ripgrep calls behind dry-run check Move require_cmd rg and metrics collection inside the non-dry-run path so that --dry-run works on hosts without rg installed. * feat(tooling): cross-platform protoc setup for Linux and macOS Make install-protoc.sh support Linux (x86_64, aarch64) alongside macOS, and bump CI protoc from 29.3 to 33.1 to match the version required by the gproto build script. * fix(bench): record internode baseline error counts * fix(skill): correct YAML frontmatter formatting for release-version-bump * chore(ci): bump protoc version to 34.1 * fix(tooling): bump protoc 33.1 to 34.1 in install script, restore SKILL.md description --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
This commit is contained in:
+30
-10
@@ -1,22 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install protoc 33.1 on macOS
|
||||
# Install protoc 34.1 on macOS and Linux
|
||||
|
||||
set -e
|
||||
|
||||
PROTOC_VERSION="33.1"
|
||||
PROTOC_VERSION="34.1"
|
||||
ARCH=$(uname -m)
|
||||
INSTALL_DIR="${HOME}/.local/bin"
|
||||
PROTOC_BIN="${INSTALL_DIR}/protoc"
|
||||
|
||||
# Select download URL based on architecture
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
# Apple Silicon (M1/M2/M3)
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-aarch_64.zip"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
# Intel Mac
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip"
|
||||
# Detect OS
|
||||
OS="$(uname -s)"
|
||||
|
||||
# Select download URL based on OS and architecture
|
||||
if [ "$OS" = "Darwin" ]; then
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
# Apple Silicon (M1/M2/M3)
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-aarch_64.zip"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
# Intel Mac
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip"
|
||||
else
|
||||
echo "Error: Unsupported macOS architecture $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$OS" = "Linux" ]; then
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip"
|
||||
else
|
||||
echo "Error: Unsupported Linux architecture $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Unsupported architecture $ARCH"
|
||||
echo "Error: Unsupported OS $OS"
|
||||
echo "On Windows, install protoc via:"
|
||||
echo " choco install protoc --version=${PROTOC_VERSION}"
|
||||
echo " or download from https://github.com/protocolbuffers/protobuf/releases"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user