matrix-gui 0.3.0

embedded-graphics based GUI framework, use region-based freeform layout.
Documentation
name: Main Branch CI

on:
  push:
    branches:
      - 'main'
  pull_request:
    branches:
      - 'main'

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    permissions:
      checks: write
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Set up Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
          
      - name: Install SDL2
        run: |
          sudo apt-get update
          sudo apt-get install -y libsdl2-dev

      - name: Build
        run: cargo build --verbose

  clippy:
    runs-on: ubuntu-latest
    needs: build-and-test

    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Set up Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true

      - name: Run Clippy and Report Errors
        if: always()
        run: |
          cargo clippy -- -D warnings || {
            echo "## Clippy Errors" >> $GITHUB_STEP_SUMMARY
            cargo clippy -- -D warnings 2>&1 | grep -E "error:" | sed 's/^/- /' >> $GITHUB_STEP_SUMMARY
            exit 1
          }