whitebreadx 0.1.0

A breadx library that provides a wrapper for libxcb and libX11.
Documentation
#               Copyright John Nunley, 2022.
# Distributed under the Boost Software License, Version 1.0.
#       (See accompanying file LICENSE or copy at
#         https://www.boost.org/LICENSE_1_0.txt)

name: CI

on:
  push:
    branches:
      - master
  pull_request:

env:
  RUSTFLAGS: -Dwarnings
  clippy_version: 1.60.0

jobs:
  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - rust: stable
    
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          profile: minimal
          override: true
          components: rustfmt
      - uses: Swatinem/rust-cache@v1
      - name: Run rustfmt
        run: cargo fmt --check
  
  clippy:
    name: clippy
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ env.clippy_version }}
          override: true
          components: clippy
      - uses: Swatinem/rust-cache@v1
      - name: Run Clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all --tests --all-features

  test:
    name: run tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain:
          - stable
          - beta
          - nightly
          - 1.49.0

    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
          override: true
      - uses: Swatinem/rust-cache@v1

      # install libxcb and libX11
      - name: Install libxcb and libX11
        run: sudo apt-get install libxcb1-dev libx11-dev libx11-xcb-dev

      # run tests for all crates
      - name: Default Features Test
        run: cargo test

      # run tests with no default features
      - name: No Default Features Test
        run: cargo test --no-default-features

      - name: Dl test
        run: cargo test --features dl

      # run tests with all features
      - name: All Features Test
        run: cargo test --all-features