name: "Linux Latest Build"
on:
  push:
    branches: [ v1.x ]
  pull_request:
    # branches: [ master ]

jobs:
  build_libebml:
    name: libebml for Linux ${{ matrix.cxx }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cxx: ['g++-14', 'clang++-18']
    env:
      CXX: ${{matrix.cxx}}
    steps:
      - name: list compilers
        run: dpkg --list | grep compiler

      - name: Get pushed code
        uses: actions/checkout@v7

      - name: Configure CMake
        run: cmake -S . -B _build -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built -G Ninja

      - name: Build with CMake
        run: cmake --build _build --parallel

      - name: Test installation
        run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built
