blade 0.3.0

Sharp and simple graphics library
Documentation
name: check

on:
  push:
    branches: ["main"]
    tags: [v0.*]
  pull_request:

jobs:
  build:
    strategy:
      matrix:
        include:
          - name: Linux
            os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            full: true

          - name: Windows
            os: windows-latest
            target: x86_64-pc-windows-msvc
            full: true

          - name: macOS
            os: macos-latest
            target: aarch64-apple-darwin
            full: true

          - name: iOS
            os: macos-latest
            target: aarch64-apple-ios
            full: false

          - name: Web
            os: ubuntu-latest
            target: wasm32-unknown-unknown
            full: false

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v3

      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          target: ${{ matrix.target }}
          override: true

      - name: Check Basics
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: --target ${{ matrix.target }} --workspace --all --no-default-features

      - name: Test Basics
        if: matrix.full
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: -p blade-render --no-default-features

      - name: Test All
        if: matrix.full
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --workspace --all-features

      - name: Test GLES
        if: matrix.name == 'Linux'
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --example bunnymark
        env:
          RUSTFLAGS: "--cfg gles"

  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: checkout repo
        uses: actions/checkout@v3

      - name: install rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt

      - name: run rustfmt
        run: |
          cargo fmt -- --check