on: push
name: CI
jobs:
  build_and_test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]

    steps:
      - uses: actions/checkout@v2

      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build

      - name: Test
        uses: actions-rs/cargo@v1
        with:
          command: test

      - name: Run bobyqa
        uses: actions-rs/cargo@v1
        with:
          command: run
          args: --example bobyqa

      - name: Run mma
        uses: actions-rs/cargo@v1
        with:
          command: run
          args: --example mma
