name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - run: ./autogen.sh
    - run: ./configure
    - run: make
    - run: make test
  test-macos:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - run: brew install automake
    - run: ./autogen.sh
    - run: ./configure
    - run: make
  valgrind-test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - run: sudo apt update
    - run: sudo apt install --assume-yes valgrind
    - run: ./autogen.sh
    - run: ./configure --enable-debug --enable-transparent --enable-reverse
    - run: make
    - run: make test
    - run: make valgrind-test
