From 2230baf2f82040989e716bbb21df6fc08917d62f Mon Sep 17 00:00:00 2001 From: robojerk Date: Sun, 10 Aug 2025 00:41:32 -0700 Subject: [PATCH] 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 --- .forgejo/workflows/build-artifacts.yml | 13 ++++++++++--- .forgejo/workflows/simple-build.yml | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/build-artifacts.yml b/.forgejo/workflows/build-artifacts.yml index 814bc18..134c56b 100644 --- a/.forgejo/workflows/build-artifacts.yml +++ b/.forgejo/workflows/build-artifacts.yml @@ -59,10 +59,17 @@ jobs: fi # 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.) - # No need to manually install components + # Install required Rust 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 run: | diff --git a/.forgejo/workflows/simple-build.yml b/.forgejo/workflows/simple-build.yml index 204beb0..81d1a56 100644 --- a/.forgejo/workflows/simple-build.yml +++ b/.forgejo/workflows/simple-build.yml @@ -16,15 +16,22 @@ jobs: container: # Use complete Rust image with all components pre-installed # This avoids the "whack-a-mole" of adding components one by one - image: rust:1.89 + image: rust:slim-trixie steps: - name: Checkout code and setup environment run: | apt update -y 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 - # No need for manual component installation! + # Install required Rust 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 echo "✅ Using pre-installed Rust from official image:" rustc --version cargo --version