name: Rust

on:
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - name: Simple check
      run: cargo check --verbose
    - name: Install font for draws feature
      run: sudo apt install -y libfontconfig1-dev
    - name: Check features
      run: cargo check --all-features --verbose

    - name: Run simple test
      run: cargo test --verbose
    - name: Test features
      run: cargo test --all-features --verbose

    - name: Check examples
      run: cargo check --examples --all-features --verbose