drm-gfx 0.2.1

3D graphics rendering for direct rendering manager with optional tokio thread support
Documentation
on:
  push:
    tags:
      - "[0-9]+.[0-9]+.[0-9]+"

name: Reease
permissions:
  actions: read # Read workflow data
  contents: read # Read repository contents

jobs:
  checks:
    name: checks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo check --example triangles --example points --example lines --example spinning-cube
      - run: cargo check --features tokio-threads --example tokio-triangles
      - run: cargo clippy --all-features -- -D warnings
      - run: cargo fmt --all --check
      - run: cargo doc

  test:
    needs:
      - checks
    name: cargo test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo test --tests --lib

  build:
    needs:
      - test
    name: cargo build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo build --lib
      - run: cargo build --lib --features tokio-threads
      - run: cargo build --example triangles --example lines --example points --example spinning-cube
      - run: cargo build --features tokio-threads --example tokio-triangles
      - run: cargo build --release --lib
      - run: cargo build --release --example triangles --example lines --example points --example spinning-cube
      - run: cargo build --release --features tokio-threads --example tokio-triangles

  publish:
    needs:
      - checks
      - test
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo publish --token ${{ secrets.CRATES_TOKEN }}