mg 0.16.0

Minimal UI library based on GTK+.
Documentation
on:
  push:
    branches: [master]
  pull_request:

name: CI

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
          - beta
          - nightly
    env:
        DISPLAY: ":99.0"
        # Workaround to avoid getting stuck by apt about choosing a timezone.
        DEBIAN_FRONTEND: noninteractive
        TZ: America/New_York
    steps:
      - run: sudo apt-get update -y
      - run: sudo apt-get install -y libgtk-3-dev libglib2.0-dev libgraphene-1.0-dev git xvfb curl libcairo-gobject2 libcairo2-dev libxdo-dev libwebkit2gtk-4.0-dev openbox
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          override: true
      # nightly
      - name: "mg: build nightly"
        run: cargo build
        if: matrix.rust == 'nightly'
      # not nightly
      - name: "mg: build"
        run: cargo build
        if: matrix.rust != 'nightly'

      - name: "mg: tests"
        run: |
            Xvfb :99 &
            sleep 3
            openbox &
            cargo test

      - name: "mg: build examples"
        run: cargo build --examples

      - uses: bcomnes/cleanup-xvfb@v1.0.6