fix: resolve CI workflow failures with Rust toolchain setup
Some checks failed
CI / build (push) Failing after 4m0s
CI / lint (push) Failing after 2m36s
CI / format (push) Failing after 51s

This commit is contained in:
2026-02-04 16:04:11 +00:00
parent d1f8c0994e
commit 05ef7d9ec8

View File

@@ -12,39 +12,55 @@ jobs:
steps: steps:
- name: Set up Rust - name: Set up Rust
run: | run: |
rustup install stable curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
rustup default stable export PATH="$HOME/.cargo/bin:$PATH"
rustc --version
cargo --version
- name: Install dependencies - name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgit2-dev pkg-config run: |
sudo apt-get update
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
- name: Build project - name: Build
run: cargo build --release run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --release 2>&1
- name: Run tests - name: Run tests
run: cargo test --all run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo test --all 2>&1
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Rust - name: Set up Rust
run: | run: |
rustup install stable curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
rustup default stable export PATH="$HOME/.cargo/bin:$PATH"
rustup component add clippy
- name: Install dependencies - name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgit2-dev pkg-config run: |
sudo apt-get update
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
- name: Run clippy - name: Run clippy
run: cargo clippy --all-features -- -D warnings run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo clippy --all-features -- -D warnings 2>&1
format: format:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Rust - name: Set up Rust
run: | run: |
rustup install stable curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
rustup default stable export PATH="$HOME/.cargo/bin:$PATH"
rustup component add rustfmt
- name: Check formatting - name: Check formatting
run: cargo fmt --all -- --check run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo fmt --all -- --check 2>&1