From 71c0ca1d60133ec379cc505d4ad889e59a4d5793 Mon Sep 17 00:00:00 2001 From: drendog Date: Sat, 24 Jan 2026 05:41:04 +0100 Subject: [PATCH] ci: install nightly toolchain for nightly rustfmt --- .github/workflows/ci.yml | 117 ++++++++++++++++++---------------- crates/adapters/src/lib.rs | 1 - crates/composition/src/lib.rs | 1 - 3 files changed, 61 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f690de3..35deecd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,74 +1,79 @@ name: CI on: - push: - branches: [main] - pull_request: - branches: [main] + push: + branches: [main] + pull_request: + branches: [main] env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - libwayland-dev \ - libxkbcommon-dev \ - libegl1-mesa-dev \ - libgles2-mesa-dev \ - libfontconfig1-dev + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libwayland-dev \ + libxkbcommon-dev \ + libegl1-mesa-dev \ + libgles2-mesa-dev \ + libfontconfig1-dev - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: clippy - - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Install Rust nightly toolchain + uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt - - name: Cache cargo index - uses: actions/cache@v4 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - name: Cache cargo build - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v4 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - name: Check formatting - run: cargo +nightly fmt --all -- --check + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - name: Run clippy - run: cargo clippy --workspace --all-targets -- -D warnings + - name: Check formatting + run: cargo +nightly fmt --all -- --check - - name: Build workspace - run: cargo build --workspace --verbose + - name: Run clippy + run: cargo clippy --workspace --all-targets -- -D warnings - - name: Run tests - run: cargo test --workspace --verbose + - name: Build workspace + run: cargo build --workspace --verbose - - name: Build documentation - run: cargo doc --workspace --no-deps --verbose + - name: Run tests + run: cargo test --workspace --verbose - - name: Build examples - run: | - cargo build -p simple-bar - cargo build -p multi-surface - cargo build -p declarative-config - cargo build -p event-loop-examples - cargo build -p runtime-surface-config + - name: Build documentation + run: cargo doc --workspace --no-deps --verbose + + - name: Build examples + run: | + cargo build -p simple-bar + cargo build -p multi-surface + cargo build -p declarative-config + cargo build -p event-loop-examples + cargo build -p runtime-surface-config diff --git a/crates/adapters/src/lib.rs b/crates/adapters/src/lib.rs index e84e496..11619fb 100644 --- a/crates/adapters/src/lib.rs +++ b/crates/adapters/src/lib.rs @@ -21,7 +21,6 @@ pub(crate) mod logger { #[cfg(feature = "log")] pub use log::{debug, error, info, warn}; - #[cfg(feature = "tracing")] pub use tracing::{debug, error, info, warn}; } diff --git a/crates/composition/src/lib.rs b/crates/composition/src/lib.rs index f5189cf..ce69cfb 100644 --- a/crates/composition/src/lib.rs +++ b/crates/composition/src/lib.rs @@ -66,7 +66,6 @@ pub(crate) mod logger { #[cfg(feature = "log")] pub use log::{debug, error, info, warn}; - #[cfg(feature = "tracing")] pub use tracing::{debug, error, info, warn}; }