name: Build and test
on:
  # Run for any commit in origin repository
  push:
  # And pull requests from forks
  pull_request:
    branches:
      # This avoids running the job twice for PRs from origin repository
    - '**:**'

env:
  BUILD_TYPE: Release

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04]

    steps:
    - name: Install dependencies
      run: |
        sudo apt install build-essential cmake git libboost-system-dev libboost-thread-dev
        git clone https://github.com/google/googletest.git
        cd googletest
        cmake CMakeLists.txt
        make
        sudo make install

    - uses: actions/checkout@v2

    - name: Configure CMake
      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-Werror"

    - name: Build
      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{env.BUILD_TYPE}}

Add GitHub workflow for CI
Add GitHub workflow for CI

Signed-off-by: Jacob Perron <5d39aecf28d3f95fa005cd6cbb5bdb92fcd64155@gmail.com>
