Suppress hash() clang integer sanitizer issues (#667)

* Add sanitizer CI

* Fix setup

* Separate sanatizers

* Add integer sanitizers

* Finalize sanitizer list

* Specify libc++

* Remove overly complicated sanitizers

* Readd removed CI

* Suppress hash() clang integer sanitizer issues

* Add changes to parts

* Add version limit

Co-authored-by: Stefan <29021710+Saalvage@users.noreply.github.com>
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f836a71..96fd9a1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -64,6 +64,30 @@
       - name: Build
         run: cmake --build build
 
+  sanitizers:
+    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
+    runs-on: ubuntu-22.04
+    
+    strategy:
+      fail-fast: false
+      matrix:
+        sanitizers: ["address", "thread", "undefined", "integer", "implicit-conversion", "nullability", "safe-stack"]
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Install
+        run: sudo apt-get install -y ninja-build
+
+      - name: Generate
+        run: cmake -B build -S . -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_EXPORT_COMPILE_COMMANDS=ON -D CMAKE_CXX_FLAGS="-fsanitize=${{ matrix.sanitizers }}"
+
+      - name: Build
+        run: cmake --build build
+        
+      - name: Test
+        run: ctest --test-dir build --no-tests=error
+
   ci:
     if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
     runs-on: ${{ matrix.os }}