name: Ubuntu aarch64

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

jobs:
  build-22:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cxxversion: [17, 20]
        compiler: [g++, clang++-19]
    steps:
      - uses: actions/checkout@v6
      - uses: uraimo/run-on-arch-action@v3
        name: Test
        id: runcmd
        with:
          arch: aarch64
          githubToken: ${{ github.token }}
          distro: ubuntu24.04
          install: |
            apt-get update -q -y
            apt-get install -y cmake make g++ clang-19
          run: |
            cmake \
               -DCMAKE_BUILD_TYPE=Release \
               -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
               -DSIMDUTF_ALWAYS_INCLUDE_FALLBACK=ON \
               -DSIMDUTF_FAST_TESTS=On \
               -DSIMDUTF_CXX_STANDARD=${{ matrix.cxxversion }} \
               -B build
            cmake --build build -j=$(nproc)
            ctest --output-on-failure --test-dir build -j=$(nproc)
