on: [push, pull_request]

name: ci

jobs:
  build_macos:
    name: build on macos
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release

  build_and_test:
    name: build and test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: check
        run: cargo check 
      - name: clippy
        run: cargo clippy
      - name: test
        run: cargo test 
      - name: build
        run: cargo build --release
