relm 0.24.1

Asynchronous, GTK+-based, GUI library, inspired by Elm, written in Rust
Documentation
on:
  workflow_dispatch:
  push:
    branches: [master]
  pull_request:

name: CI

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: ubuntu:20.04
    strategy:
      matrix:
        rust:
          - stable
          - beta
          - nightly
          - "1.63.0"
    env:
        DISPLAY: ":99.0"
        # Workaround to avoid getting stuck by apt about choosing a timezone.
        DEBIAN_FRONTEND: noninteractive
        TZ: America/New_York
    steps:
      - run: apt-get update -y
      - run: 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: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          components: clippy
      - name: "clippy"
        run: cargo clippy -- --deny warnings

      # nightly
      - name: "relm: build nightly"
        run: cargo build
        if: matrix.rust == 'nightly'
      # not nightly
      - name: "relm: build"
        run: cargo build
        if: matrix.rust != 'nightly'

      - name: "relm: tests"
        run: |
            Xvfb :99 &
            sleep 3
            openbox &
            cargo test --manifest-path relm-examples/Cargo.toml -- --nocapture

      - name: "relm-derive: tests"
        run: |
            cargo test --manifest-path relm-derive/Cargo.toml -- --nocapture

      - name: "relm: test examples"
        run: |
            Xvfb :99 &
            sleep 3
            openbox &
            cargo test --manifest-path relm-examples/Cargo.toml --examples

      - name: "relm: test buttons-attribute example"
        run: |
            Xvfb :99 &
            sleep 3
            openbox &
            cargo test --manifest-path relm-examples/examples/buttons-attribute/Cargo.toml

      - name: "relm: build http example"
        run: cargo build --manifest-path relm-examples/examples/http/Cargo.toml

      - name: "relm: build async example"
        run: cargo build --manifest-path relm-examples/examples/async/Cargo.toml

      # - name: "relm: build webkit-test example"
      #   run: cargo build --manifest-path relm-examples/examples/webkit-test/Cargo.toml

      - name: "relm: clean tests"
        run: cargo clean --manifest-path relm-examples/Cargo.toml

      - name: "relm: clean http example"
        run: cargo clean --manifest-path relm-examples/examples/http/Cargo.toml

      - name: "relm: clean async example"
        run: cargo clean --manifest-path relm-examples/examples/async/Cargo.toml

      # - name: "relm: clean webkit-test example"
      #   run: cargo clean --manifest-path relm-examples/examples/webkit-test/Cargo.toml

      - name: "relm: build 7gui counter example"
        run: cargo build --manifest-path relm-examples/examples/7gui/1_counter/Cargo.toml

      - name: "relm: build 7gui temperature converter example"
        run: cargo build --manifest-path relm-examples/examples/7gui/2_temperature_converter/Cargo.toml

      - name: "relm: build 7gui flight booker example"
        run: cargo build --manifest-path relm-examples/examples/7gui/3_flight_booker/Cargo.toml

      - name: "relm: build 7gui progress bar example"
        run: cargo build --manifest-path relm-examples/examples/7gui/4_progress_bar/Cargo.toml

      - name: "relm: build 7gui crud example"
        run: cargo build --manifest-path relm-examples/examples/7gui/5_crud/Cargo.toml

      - name: "relm: build 7gui circle drawer example"
        run: cargo build --manifest-path relm-examples/examples/7gui/6_circle_drawer/Cargo.toml

      - name: "relm: build 7gui cells example"
        run: cargo build --manifest-path relm-examples/examples/7gui/7_cells/Cargo.toml

      - name: "relm: test 7gui cells example"
        run: cargo test --manifest-path relm-examples/examples/7gui/7_cells/Cargo.toml

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