name: Linux

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

jobs:
  Linux:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        dist:
          - ubuntu2204_clang
          - ubuntu2204_gcc
          - ubuntu2404_clang
          - ubuntu2404_gcc
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Build container
        run: docker build . -t ${{ matrix.dist }} -f docker/${{ matrix.dist }}.docker

      - name: Test
        run: docker run --rm ${{ matrix.dist }} /bin/bash -c 'cd /code/build && ctest --output-on-failure'
