Add support for -bevy-image-rect
#63
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["*"] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Run cargo check --workspace --all-targets -- -D warnings | |
| check: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Linux x86_64 | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - name: MacOS aarch64 | |
| os: macos-14 | |
| target: aarch64-apple-darwin | |
| name: Check ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-check-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install ubuntu deps | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libudev-dev | |
| - name: cargo check | |
| run: cargo check --workspace --target ${{ matrix.target }} | |
| - name: cargo check --release | |
| run: cargo check --release --workspace --target ${{ matrix.target }} | |
| check-wasm: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/cache@v3 | |
| with: | |
| key: ${{ runner.os }}-wasm32-unknown-unknown-cargo-check-${{ hashFiles('**/Cargo.toml') }} | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| target: wasm32-unknown-unknown | |
| - name: cargo check | |
| run: cargo check --workspace --target wasm32-unknown-unknown | |
| env: | |
| RUSTFLAGS: --cfg getrandom_backend="wasm_js" | |
| - name: cargo check --release | |
| run: cargo check --release --workspace --target wasm32-unknown-unknown | |
| env: | |
| RUSTFLAGS: --cfg getrandom_backend="wasm_js" | |
| # Run cargo clippy --workspace --all-targets -- -D warnings | |
| clippy: | |
| name: Clippy | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| 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 ubuntu deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libudev-dev | |
| - name: cargo clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: cargo clippy --release | |
| run: cargo clippy --release --workspace --all-targets -- -D warnings | |
| # Run cargo fmt --all -- --check | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: cargo fmt | |
| run: cargo fmt --all -- --check | |
| # Run cargo doc --workspace --no-deps --examples --all-features --document-private-items | |
| doc: | |
| name: Doc check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install ubuntu deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libudev-dev | |
| - name: Run cargo doc | |
| run: cargo doc --workspace --no-deps --examples --all-features --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| # Run cargo test --workspace | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| 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 | |
| - name: Install ubuntu deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libudev-dev | |
| - name: cargo test | |
| run: cargo test --workspace | |
| # Run cargo check --all-targets using MSRV | |
| check-msrv: | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-check-msrv-${{ hashFiles('**/Cargo.toml') }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: get MSRV | |
| id: msrv | |
| run: | | |
| msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy_flair") | .rust_version'` | |
| echo "msrv=$msrv" >> $GITHUB_OUTPUT | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ steps.msrv.outputs.msrv }} | |
| - name: Install ubuntu deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libudev-dev | |
| - name: cargo check | |
| run: cargo check --all-targets | |
| - name: cargo check --release | |
| run: cargo check --release --all-targets |