embedded-canvas 0.3.2

Draw anything with ease on the Canvas before drawing it to your small hardware display
Documentation
on: [push, pull_request]

name: Continuous integration

# Stops the running workflow of previous pushes
concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  build-and-test:
    name: Build and test
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v5

      - name: Install SDL2
        run: |
          sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
          sudo apt-get update -y -qq
          sudo apt-get install libsdl2-dev

      - name: Rust setup (stable)
        uses: dtolnay/rust-toolchain@stable

      - name: Run tests with --all-features
        run: cargo test --all-features

      - name: Run tests with --no-default-features
        run: cargo test --no-default-features

      - name: Build
        run: cargo build --all-features

  lints-and-checks:
    name: Lints and checks
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Rust setup (nightly)
        uses: dtolnay/rust-toolchain@nightly
        with:
          components: rust-docs, rustfmt, clippy

      - name: Lint - rustfmt
        run: cargo fmt --all -- --check
    
      - name: Lint - clippy
        run: cargo clippy --all --no-deps -- -D warnings

      - name: Build docs with --all-features
        env:
          RUSTDOCFLAGS: -D warnings --cfg docsrs
        run: cargo doc --no-deps --all-features