From 7cf707883a37127f7734ce39aaef9efe4ead413b Mon Sep 17 00:00:00 2001 From: Daniel Bengl Date: Sat, 14 Feb 2026 09:09:45 +0100 Subject: [PATCH 1/2] Simplify / Improve CI performance --- .github/workflows/ci.yml | 70 +++++++--------------------------------- 1 file changed, 11 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae78a89c..cd639d15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,71 +1,23 @@ name: CI - on: [push] env: CARGO_TERM_COLOR: always jobs: - test: - name: Test Suite + check: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v4 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }} - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Install Dependencies - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libglib2.0-dev libgtk-3-dev - - name: Run cargo test - run: cargo test - - clippy_check: - name: Clippy - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - name: Install Dependencies - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libglib2.0-dev libgtk-3-dev - - name: Run clippy - run: cargo clippy -- -D warnings - - format: - name: Format - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - name: Run cargo fmt - run: cargo fmt --all -- --check + run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libglib2.0-dev libgtk-3-dev + + - run: cargo fmt --all -- --check + - run: cargo clippy -- -D warnings + - run: cargo test From a381b75065b9e56ca7973679a317a6224347f04e Mon Sep 17 00:00:00 2001 From: Daniel Bengl Date: Sat, 14 Feb 2026 09:37:16 +0100 Subject: [PATCH 2/2] Optimize cargo.toml, improve ci deps --- .github/workflows/ci.yml | 17 +++++++++++++---- Cargo.toml | 18 +++++++++--------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd639d15..44ddd21d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,16 @@ env: CARGO_TERM_COLOR: always jobs: + fastcheck: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - run: cargo fmt --all -- --check + check: runs-on: ubuntu-latest timeout-minutes: 30 @@ -12,12 +22,11 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - components: clippy, rustfmt + components: clippy - uses: Swatinem/rust-cache@v2 - + - name: Install Dependencies run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libglib2.0-dev libgtk-3-dev - - - run: cargo fmt --all -- --check + - run: cargo clippy -- -D warnings - run: cargo test diff --git a/Cargo.toml b/Cargo.toml index b2801226..b7464ce6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ rust-version = "1.90.0" [dependencies] -egui = "0.33.3" +egui = {version = "0.33.3", optional = true} bevy = "0.17.3" bevy_asset = "0.17.3" bevy_camera = "0.17.3" @@ -16,13 +16,13 @@ bevy_dev_tools = "0.17.3" bevy_fps_controller = {version = "17.1.0", features = ["rapier"]} bevy_rapier3d = {version ="0.32"} bevy_flair = "0.6.0" -bevy_egui = { version = "0.38.1", features = ["immutable_ctx"]} +bevy_egui = { version = "0.38.1", features = ["immutable_ctx"], optional = true} bevy_diagnostic = "0.17.3" -bevy-inspector-egui = {version = "0.35", features = ["bevy_render"]} +bevy-inspector-egui = {version = "0.35", features = ["bevy_render"], optional = true} bevy_renet = "3.0.0" bevy_mod_billboard = "0.7.0" -renet_visualizer = {version="1.1.0", features=["bevy"]} -egui_plot = "0.34.0" +renet_visualizer = {version="1.1.0", features=["bevy"], optional = true} +egui_plot = {version = "0.34.0", optional = true} noise = "0.9.0" cgmath = "0.18.0" @@ -68,14 +68,14 @@ dynamic_linking = ["bevy/dynamic_linking"] chat = [] # server -renet_visualizer = ["egui_layer"] -generator_visualizer = ["egui_layer"] -egui_layer = [] +renet_visualizer = ["egui_layer", "dep:renet_visualizer", "dep:bevy-inspector-egui"] +generator_visualizer = ["egui_layer", "dep:egui_plot", "dep:bevy-inspector-egui"] +egui_layer = ["dep:bevy_egui", "dep:egui"] skip_chunk_padding = [] # client wireframe = [] -debug_ui = [] +debug_ui = ["dep:bevy-inspector-egui"] ortho_camera = [] lock_player = [] physics_debug = []