name: ci

on: [push, pull_request]

jobs:
  build:

    runs-on: ${{ matrix.os }}
    
    strategy:
      matrix:
        os: [ubuntu-16.04, ubuntu-18.04]
        compiler: [gcc, clang]
    
    steps:
    - uses: actions/checkout@v1
      with: 
        submodules: recursive
    - name: apt-get
      run: sudo apt-get install -y libedit-dev lcov python3-docutils python3-sphinx 
    - name: prereq
      run: |
        cd libmaxminddb && ./bootstrap && ./configure && make && sudo make install && cd ..
        git clone https://github.com/varnishcache/varnish-cache.git
        cd varnish-cache && ./autogen.sh && ./configure && make && sudo make install && sudo ldconfig && cd ..
    - name: autogen.sh
      run: ./autogen.sh
    - name: enable gcov
      if: matrix.compiler == 'gcc'
      run: echo ::set-env name=CONFIGURE_ARGS::--enable-gcov
    - name: configure
      run: CC=${{ matrix.compiler }} ./configure CFLAGS="-Wall -Wextra -Werror" $CONFIGURE_ARGS
    - name: make
      run: make
    - name: make check
      run: make check VERBOSE=1
    - name: codecov
      run: bash <(curl -s https://codecov.io/bash)
    - name: make distcheck
      run: make distcheck

name: ci

on: [push, pull_request]

jobs:
  build:

    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-16.04, ubuntu-18.04]
        compiler: [gcc, clang]

    steps:
    - uses: actions/checkout@v1
      with:
        submodules: recursive
    - name: apt-get
      run: sudo apt-get install -y libedit-dev lcov python3-docutils python3-sphinx
    - name: prereq
      run: |
        cd libmaxminddb && ./bootstrap && ./configure && make && sudo make install && cd ..
        git clone https://github.com/varnishcache/varnish-cache.git
        cd varnish-cache && ./autogen.sh && ./configure && make && sudo make install && sudo ldconfig && cd ..
    - name: autogen.sh
      run: ./autogen.sh
    - name: enable gcov
      if: matrix.compiler == 'gcc' && matrix.os == 'ubuntu-18.04'
      run: echo ::set-env name=CONFIGURE_ARGS::--enable-gcov
    - name: configure
      run: CC=${{ matrix.compiler }} ./configure CFLAGS="-Wall -Wextra -Werror" $CONFIGURE_ARGS
    - name: make
      run: make
    - name: make check
      run: make check VERBOSE=1
    - name: codecov
      run: bash <(curl -s https://codecov.io/bash)
    - name: make distcheck
      run: make distcheck

Tidy up and whitespace ocd
Tidy up and whitespace ocd
