Skip to content

Fix flakiness and crashes in mandelbrot test under CFI, ASan, and MSan #3364

Fix flakiness and crashes in mandelbrot test under CFI, ASan, and MSan

Fix flakiness and crashes in mandelbrot test under CFI, ASan, and MSan #3364

permissions: read-all
name: Meson build / test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
meson_setup_args: -Dwarning_level=2 -Dbuildtype=debugoptimized -Dgtest:cpp_eh=default
jobs:
ubuntu_jammy_x86_64:
name: Meson build and test ${{ matrix.compiler }} (C++${{ matrix.cxx_standard }}) on Jammy x86_64
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [Clang-15, GCC-12]
cxx_standard: [17]
include:
- compiler: Clang-15
extra_deps: clang-15
c_compiler: clang-15
cxx_compiler: clang++-15
cxx_flags: -DHWY_DISABLED_TARGETS=0x59d8 # disable every x86 target except AVX2
extra_setup_args: -Dcontrib=disabled
- compiler: GCC-12
extra_deps: g++-12
c_compiler: gcc-12
cxx_compiler: g++-12
cxx_flags: -ftrapv -DHWY_DISABLED_TARGETS=0x59d8
extra_setup_args: -Dcontrib=disabled
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: audit # cannot be block - runner does git checkout
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# meson on jammy is at version 0.61.2, so install through pipx
- name: Install build requirements
run: pipx install meson
- name: Install deps
run: sudo apt-get update && sudo apt-get install libgtest-dev ${{ matrix.extra_deps }}
- name: Configure Build
run: meson setup out -Dwerror=true -Dcpp_std=c++${{ matrix.cxx_standard }} ${{env.meson_setup_args}} ${{ matrix.extra_setup_args }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.c_compiler}}
CXXFLAGS: ${{ matrix.cxx_flags }}
- name: Report Targets
run: |
meson compile -C out hwy_list_targets
out/hwy_list_targets
- name: Build
run: meson compile -C out -j 2 -v
- name: Test
run: meson test -C out -j 2 --print-errorlogs
ubuntu_noble_x86_64:
name: Meson build and test ${{ matrix.compiler }} (C++${{ matrix.cxx_standard }}) on Noble x86_64
runs-on: ubuntu-24.04
strategy:
matrix:
compiler: [Clang-18, GCC-14]
cxx_standard: [17]
include:
- compiler: Clang-18
extra_deps: clang-18
c_compiler: clang-18
cxx_compiler: clang++-18
cxx_flags: -DHWY_DISABLED_TARGETS=0x59d8
- compiler: GCC-14
c_compiler: gcc-14
cxx_compiler: g++-14
cxx_flags: -ftrapv -DHWY_DISABLED_TARGETS=0x59d8
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: audit # cannot be block - runner does git checkout
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# meson on noble is at 1.3.2
- name: Install deps
run: sudo apt-get update && sudo apt-get install ninja-build meson libgtest-dev ${{ matrix.extra_deps }}
- name: Configure Build
run: meson setup out -Dcpp_std=c++${{ matrix.cxx_standard }} ${{env.meson_setup_args}} ${{ matrix.extra_setup_args }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.c_compiler}}
CXXFLAGS: ${{ matrix.cxx_flags }}
# builds libhwy and compiles the target list executable
- name: Report Targets
run: |
meson compile -C out -v hwy_list_targets
out/hwy_list_targets
- name: Build
run: meson compile -C out -j 2 -v
- name: Test
run: meson test -C out -j 2 --print-errorlogs
ubuntu_noble_arm:
name: Meson build and test ${{ matrix.compiler }} (C++${{ matrix.cxx_standard}}) on Noble AArch64
runs-on: ubuntu-24.04-arm
strategy:
matrix:
compiler: [GCC-14]
cxx_standard: [17]
include:
- compiler: GCC-14
extra_deps: g++-14
c_compiler: gcc-14
cxx_compiler: g++-14
cxx_flags: -ftrapv -DHWY_DISABLED_TARGETS=0x318c0000 # Only target HWY_NEON_BF16
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: audit # cannot be block - runner does git checkout
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install deps
run: sudo apt-get update && sudo apt-get install ninja-build meson libgtest-dev ${{ matrix.extra_deps }}
- name: Configure Build
run: meson setup out -Dcpp_std=c++${{ matrix.cxx_standard }} ${{env.meson_setup_args}} ${{ matrix.extra_setup_args }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.c_compiler}}
CXXFLAGS: ${{ matrix.cxx_flags }}
# builds libhwy and compiles the target list executable
- name: Report Targets
run: |
meson compile -C out -v hwy_list_targets
out/hwy_list_targets
- name: Build
run: meson compile -C out -j 2 -v
- name: Test
run: meson test -C out -j 2 --print-errorlogs ${{ matrix.extra_test_args }}
ubuntu_resolute_x86_64:
name: Meson build and test ${{ matrix.compiler }} (C++${{ matrix.cxx_standard }}) on Resolute x86_64
runs-on: ubuntu-26.04
strategy:
matrix:
compiler: [Clang-22, GCC-16, powerpc64le-linux-gnu-gcc-16]
cxx_standard: [17]
include:
- compiler: Clang-22
extra_deps: clang-22
c_compiler: clang-22
cxx_compiler: clang++-22
cxx_flags: -DHWY_DISABLED_TARGETS=0x59d8
- compiler: GCC-16
extra_deps: g++-16
c_compiler: gcc-16
cxx_compiler: g++-16
cxx_flags: -ftrapv -DHWY_DISABLED_TARGETS=0x59d8
- compiler: powerpc64le-linux-gnu-gcc-16
extra_deps: g++-16-powerpc64le-linux-gnu qemu-user
c_compiler: powerpc64le-linux-gnu-gcc-16
cxx_compiler: powerpc64le-linux-gnu-g++-16
cxx_flags: -mcpu=power9 -DHWY_COMPILE_ONLY_STATIC=1
extra_setup_args: -Dcontrib=disabled --cross-file .github/meson/gcc_16_ppc64le_meson_cross_compile_config.txt
emulator_cmd: qemu-ppc64le -cpu power10 -L /usr/powerpc64le-linux-gnu
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: audit # cannot be block - runner does git checkout
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# meson on resolute is at 1.10.1
- name: Install deps
run: sudo apt-get update && sudo apt-get install ninja-build meson libgtest-dev ${{ matrix.extra_deps }}
- name: Configure Build
run: meson setup out -Dcpp_std=c++${{ matrix.cxx_standard }} ${{env.meson_setup_args}} ${{ matrix.extra_setup_args }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.c_compiler}}
CXXFLAGS: ${{ matrix.cxx_flags }}
# builds libhwy and compiles the target list executable
- name: Report Targets
run: |
meson compile -C out -v hwy_list_targets
${{ matrix.emulator_cmd }} out/hwy_list_targets
- name: Build
run: meson compile -C out -j 2 -v
- name: Test
run: meson test -C out -j 2 --print-errorlogs
win:
name: Meson build and test ${{ matrix.compiler }} (C++${{matrix.cxx_standard}}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
include:
# these compilers currently default to what is installed on the runner images
- os: windows-2022
compiler: LLVM # @ 20.1.8
c_compiler: clang-cl
cxx_compiler: clang-cl
extra_setup_args: -Dvsenv=true
extra_test_args: --timeout-multiplier=5
cxx_flags: /DHWY_DISABLED_TARGETS=0x59d8
cxx_standard: 20
steps:
- name: Harden Runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: audit # cannot be block - runner does git checkout
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# update the meson gtest wrap because we're going to use a c++17 standard
- name: Install deps
run: |
pipx install meson
- name: Configure Build
run: meson setup out -Dcpp_std=c++${{ matrix.cxx_standard }} ${{env.meson_setup_args}} ${{ matrix.extra_setup_args }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.c_compiler}}
CXXFLAGS: ${{ matrix.cxx_flags }}
# builds libhwy and compiles the target list executable
- name: Report Targets
run: |
meson compile -C out hwy_list_targets
out\hwy_list_targets
- name: Build
run: meson compile -C out -j 2 -v
- name: Test
run: meson test -C out -j 2 --print-errorlogs ${{ matrix.extra_test_args }}