Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a97ec39a1c |
@@ -40,19 +40,39 @@ jobs:
|
|||||||
if command -v apt-get >/dev/null 2>&1; then
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y build-essential pkg-config sqlite3 curl tar ca-certificates nodejs npm
|
apt-get install -y build-essential pkg-config sqlite3 curl tar ca-certificates nodejs npm
|
||||||
|
elif command -v apk >/dev/null 2>&1; then
|
||||||
|
apk add --no-cache build-base pkgconf sqlite curl wget tar ca-certificates nodejs npm bash git
|
||||||
elif command -v dnf >/dev/null 2>&1; then
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
dnf install -y gcc gcc-c++ make pkgconf-pkg-config sqlite curl tar ca-certificates nodejs npm
|
dnf install -y gcc gcc-c++ make pkgconf-pkg-config sqlite curl tar ca-certificates nodejs npm
|
||||||
elif command -v yum >/dev/null 2>&1; then
|
elif command -v yum >/dev/null 2>&1; then
|
||||||
yum install -y gcc gcc-c++ make pkgconfig sqlite curl tar ca-certificates nodejs npm
|
yum install -y gcc gcc-c++ make pkgconfig sqlite curl tar ca-certificates nodejs npm
|
||||||
elif command -v pacman >/dev/null 2>&1; then
|
elif command -v pacman >/dev/null 2>&1; then
|
||||||
pacman -Sy --noconfirm base-devel pkgconf sqlite curl tar ca-certificates nodejs npm
|
pacman -Sy --noconfirm base-devel pkgconf sqlite curl tar ca-certificates nodejs npm
|
||||||
|
else
|
||||||
|
echo "未找到支持的包管理器,当前系统信息:"
|
||||||
|
uname -a || true
|
||||||
|
cat /etc/os-release || true
|
||||||
|
echo "PATH=$PATH"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
command -v git
|
||||||
|
command -v tar
|
||||||
|
command -v node
|
||||||
|
command -v npm
|
||||||
|
command -v curl || command -v wget
|
||||||
|
|
||||||
- name: 安装 Rust
|
- name: 安装 Rust
|
||||||
run: |
|
run: |
|
||||||
set -eux
|
set -eux
|
||||||
if ! command -v cargo >/dev/null 2>&1; then
|
if ! command -v cargo >/dev/null 2>&1; then
|
||||||
|
if command -v curl >/dev/null 2>&1; then
|
||||||
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
|
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||||
|
elif command -v wget >/dev/null 2>&1; then
|
||||||
|
wget -qO- https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||||
|
else
|
||||||
|
echo "缺少 curl/wget,无法安装 Rust"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
fi
|
fi
|
||||||
rustc -V
|
rustc -V
|
||||||
|
|||||||
Reference in New Issue
Block a user