name: C++ compatibility build
on: [push, pull_request]
concurrency:
  group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
  cancel-in-progress: true
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cxx-version: [11, 14, 17, 20]
    steps:
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: |
          sudo apt install g++ cmake
    - name: Setup
      run: |
        mkdir _build
        cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}}
    - name: Build
      run: cmake --build _build

