Add comprehensive Rust component installation to workflows
- Install clippy, rustfmt, rust-src, and rust-analysis components - Add additional system packages: pkg-config, build-essential - Follow the same pattern as original bootupd project - This should resolve all missing component errors in CI/CD - Components are installed after Rust toolchain is verified
This commit is contained in:
parent
ec795735cd
commit
2230baf2f8
2 changed files with 20 additions and 6 deletions
|
|
@ -59,10 +59,17 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install additional build dependencies
|
# Install additional build dependencies
|
||||||
apt install -y libssl-dev libsystemd-dev file
|
apt install -y libssl-dev libsystemd-dev file pkg-config build-essential
|
||||||
|
|
||||||
# Rust 1.89 includes all components by default (clippy, rustfmt, etc.)
|
# Install required Rust components
|
||||||
# No need to manually install components
|
echo "Installing Rust components..."
|
||||||
|
rustup component add clippy
|
||||||
|
rustup component add rustfmt
|
||||||
|
rustup component add rust-src # For better error messages
|
||||||
|
rustup component add rust-analysis # For IDE support
|
||||||
|
|
||||||
|
echo "Available Rust components:"
|
||||||
|
rustup component list --installed
|
||||||
|
|
||||||
- name: Checkout repository manually
|
- name: Checkout repository manually
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,22 @@ jobs:
|
||||||
container:
|
container:
|
||||||
# Use complete Rust image with all components pre-installed
|
# Use complete Rust image with all components pre-installed
|
||||||
# This avoids the "whack-a-mole" of adding components one by one
|
# This avoids the "whack-a-mole" of adding components one by one
|
||||||
image: rust:1.89
|
image: rust:slim-trixie
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code and setup environment
|
- name: Checkout code and setup environment
|
||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y git curl pkg-config libssl-dev libsystemd-dev build-essential file
|
apt install -y git curl pkg-config libssl-dev libsystemd-dev build-essential file
|
||||||
|
|
||||||
# Rust 1.89.0 is already installed with all components in rust:1.89
|
# Install required Rust components
|
||||||
# No need for manual component installation!
|
echo "Installing Rust components..."
|
||||||
|
rustup component add clippy
|
||||||
|
rustup component add rustfmt
|
||||||
|
rustup component add rust-src # For better error messages
|
||||||
|
rustup component add rust-analysis # For IDE support
|
||||||
|
|
||||||
|
echo "Available Rust components:"
|
||||||
|
rustup component list --installed
|
||||||
echo "✅ Using pre-installed Rust from official image:"
|
echo "✅ Using pre-installed Rust from official image:"
|
||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue