Skip to content

Commit ac46586

Browse files
[ci] sanitize build under -fno-fast-math and -ffast-math
1 parent 86feda1 commit ac46586

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/sanitizer.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,27 @@ defaults:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
name: 'sanitizer - ${{ matrix.sanitizer }}'
12+
name: 'sanitizer - ${{ matrix.sanitizer }} ${{ matrix.fastmath }}'
1313
strategy:
1414
matrix:
1515
sanitizer:
1616
- address
1717
- undefined
18+
fastmath:
19+
- "no-fast-math"
20+
- "fast-math"
1821
steps:
1922
- name: Checkout xsimd
2023
uses: actions/checkout@v3
24+
- name: Setup compiler
25+
run: |
26+
LLVM_VERSION=20
27+
sudo apt-get update || exit 1
28+
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
29+
CC=clang-$LLVM_VERSION
30+
echo "CC=$CC" >> $GITHUB_ENV
31+
CXX=clang++-$LLVM_VERSION
32+
echo "CXX=$CXX" >> $GITHUB_ENV
2133
- name: Configure build
2234
run: |
2335
mkdir _build
@@ -26,9 +38,9 @@ jobs:
2638
-DBUILD_BENCHMARK=ON \
2739
-DBUILD_EXAMPLES=ON \
2840
-DDOWNLOAD_DOCTEST=ON \
29-
-DCMAKE_BUILD_TYPE=Release \
30-
-DCMAKE_CXX_COMPILER=clang++ \
31-
-DCMAKE_CXX_FLAGS='-fsanitize=${{ matrix.sanitizer }}' \
41+
-DCMAKE_BUILD_TYPE=Debug \
42+
-DCMAKE_CXX_COMPILER=$CXX \
43+
-DCMAKE_CXX_FLAGS='-fsanitize=${{ matrix.sanitizer }} -f${{ matrix.fastmath }} -O0 -g -fno-inline' \
3244
-G Ninja
3345
- name: Build
3446
run: ninja -C _build

0 commit comments

Comments
 (0)