name: Ubuntu 24.04 CI (GCC 13)

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  ubuntu-build:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        include:
          - {shared: ON, type : Debug}
          - {shared: OFF, type : Debug}
          - {shared: ON, type : Release}
          - {shared: OFF, type : Release}
    steps:
      - uses: actions/checkout@v6
      - name: Use cmake
        run: |
          mkdir build &&
          cd build &&
          cmake -DCMAKE_CXX_FLAGS=-Werror -DSIMDUTF_ALWAYS_INCLUDE_FALLBACK=ON -DCMAKE_INSTALL_PREFIX:PATH=destination -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_BUILD_TYPE=${{matrix.type}} ..   -DSIMDUTF_BENCHMARKS=OFF -DSIMDUTF_FAST_TESTS=ON -DSIMDUTF_TOOL_TESTS=ON &&
          cmake --build .   &&
          ctest -j --output-on-failure &&
          cmake --install . &&
          cd ../tests/installation_tests/find &&
          mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. &&  cmake --build .
