diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fb2e3f329149cf101bcf04cda36677fc5bb65903..4b13b7489547ac9439fab070fd270596e74ab1a7 100755
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -562,8 +562,8 @@ clang-tidy:
 sanitizer-address-leak-ub:
   extends: .analyze_template
   script:
-    - mkdir -p build
-    - cmake -B build
+    - mkdir -p build && cd build
+    - cmake ..
       --preset=make_all
       -DENABLE_SANITIZER_ADDRESS=ON
       -DENABLE_SANITIZER_LEAK=ON
@@ -574,8 +574,8 @@ sanitizer-address-leak-ub:
 sanitizer-thread:
   extends: .analyze_template
   script:
-    - mkdir -p build
-    - cmake -B build
+    - mkdir -p build && cd build
+    - cmake ..
       --preset=make_all
       -DENABLE_SANITIZER_THREAD=ON
     - make -j8
@@ -584,8 +584,8 @@ sanitizer-thread:
 sanitizer-memory:
   extends: .analyze_template
   script:
-    - mkdir -p build
-    - cmake -B build
+    - mkdir -p build && cd build
+    - cmake ..
       --preset=make_all
       -DENABLE_SANITIZER_MEMORY=ON
     - make -j8