Skip to content

Commit 3f70ba0

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

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/sanitizer.yml

Lines changed: 15 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"
21+
llvm-version: [20]
22+
env:
23+
CC: clang-${{ matrix.llvm-version }}
24+
CXX: clang++-${{ matrix.llvm-version }}
1825
steps:
1926
- name: Checkout xsimd
2027
uses: actions/checkout@v3
28+
- name: Setup compiler
29+
run: |
30+
wget https://apt.llvm.org/llvm.sh
31+
chmod +x llvm.sh
32+
sudo ./llvm.sh ${{ matrix.llvm-version }}
2133
- name: Configure build
2234
run: |
2335
mkdir _build
@@ -26,9 +38,8 @@ 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_FLAGS='-fsanitize=${{ matrix.sanitizer }} -f${{ matrix.fastmath }} -O0 -g -fno-inline' \
3243
-G Ninja
3344
- name: Build
3445
run: ninja -C _build

0 commit comments

Comments
 (0)