bevy_elements 0.7.8

Living environments for Bevy: sun, moon and stars, climate-driven weather, GPU wind, volumetric clouds, rain, snow and fog, lightning, terrain with hydraulic and thermal erosion, flooding, snow cover, wetness and dust — simulated in compute shaders.
Documentation
# CI for bevy_elements (canonical repository).
name: CI

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: build (standalone) + test
    needs: lint
    runs-on: [self-hosted, big]
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      # **The load-bearing step, and it is `build` rather than `test` deliberately.**
      #
      # `cargo test` compiles dev-dependencies, and this crate's dev-dependency is the FULL `bevy`
      # umbrella — the examples need a window and a camera, while the crate itself is trimmed to the
      # features it names. Cargo unifies features across a build, so under `cargo test` the crate
      # silently receives every Bevy feature there is, and a hole in its own `[dependencies]` feature
      # list cannot fail.
      #
      # The sibling crate `bevy_autogib` shipped exactly that hole: it named a type behind a feature it
      # never declared, every test passed, and the published crate did not compile for anyone. A plain
      # `cargo build` takes no dev-dependencies, so it compiles what a consumer actually gets.
      - name: Build with only the declared features
        run: cargo build

      # Includes `tests/leaf.rs`, the boundary ratchet. GPU tests are `#[ignore = "needs a GPU"]` and
      # never run here. The `isomesh` feature's crate compiles with the published isomesh 0.0.11:
      # its module and the `voxel_snow` example are feature-gated, so a plain `cargo test` skips
      # them and every voxel test would only ever run on a feature-enabled machine.
      - name: Test
        run: cargo test

      # `cargo test` includes the doctests, which is where the README compiles (the crate's
      # `#![doc = include_str!("../README.md")]`). Named so a run's log says so by itself.
      - name: Test the README's doctests
        run: cargo test --doc

      - name: Test the isomesh feature
        run: cargo test --features=isomesh --lib

      # Debug-info debugprofile links of a Bevy example ran the runner out of memory:
      # `ld terminated with signal 7 [Bus error]` (bevy_isomesh made the same failure
      # visible at 2 GB of debuginfo per example). Examples only have to load; debuginfo
      # is turned off through the dev profile (`CARGO_PROFILE_DEV_DEBUG`) for this build
      # alone, not through `RUSTFLAGS`, which would invalidate every fingerprint in the
      # runner's persistent target dir.
      - name: Build examples
        run: cargo build --examples --all-features
        env:
          CARGO_PROFILE_DEV_DEBUG: "0"

  lint:
    name: fmt + clippy + doc
    runs-on: [self-hosted, big]
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - run: cargo fmt --check
      - run: cargo clippy --all-targets --all-features -- -D warnings
      - run: cargo doc --no-deps --all-features
        env:
          RUSTDOCFLAGS: -D warnings

  wasm:
    name: wasm32 (WebGPU) library build
    needs: lint
    runs-on: [self-hosted, big]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: rustup target add wasm32-unknown-unknown
      - run: cargo build --lib --target wasm32-unknown-unknown