agpu 0.1.2

Abstract GPU Project
Documentation
name: CI
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  # Run the `rustfmt` code formatter
  rustfmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v2

      - name: Setup | System Dependencies
        uses: lyricwulf/abc@v1.2.0
        with:
          linux: libgtk-3-dev

      - name: Setup | Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          components: rustfmt

      - name: Build | Format
        run: cargo fmt --all -- --check

  # Run `clippy` linter and run test suite
  test:
    name: Test
    strategy:
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v2

      - name: Setup | System Dependencies
        uses: lyricwulf/abc@v1.1.0
        with:
          windows: ninja
          linux: libxkbcommon-dev libgtk-3-dev libxcb-composite0-dev

      - name: Setup | Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          components: clippy

      - name: Setup | Cache Cargo
        uses: Swatinem/rust-cache@v1

      - name: Build | Lint
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --workspace --all-targets --all-features -- -D clippy::all

      - name: Build | Test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --workspace --all-features