diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5d86d419e4f2427bd672b58793f8f78e147a24bd..e1ba6181dc99401acb22ad7ceeb769296fd26def 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ native_Debian:
   before_script: &native_before
     - pwd
     - export CC=gcc; export CXX=g++
+    - export CHECK_FLAGS="-DZERO_TOLERANCE=ON -DDEVELOPER_CHECKS=ON"
     - export MPLBACKEND=Agg
     # avoid using the default Debian Qt framework
     - QTCMAKE="/usr/local/Qt6/6.2.3/gcc_64/lib/cmake"
@@ -21,7 +22,7 @@ native_Debian:
     - mkdir build
     - cd build
     # NOTE: CMake's Ninja generator should not be used with CMake < 3.26 due to internal bugs.
-    - time cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH="$QTCMAKE" -DZERO_TOLERANCE=ON -DDEVELOPER_CHECKS=ON
+    - time cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH="$QTCMAKE" $CHECK_FLAGS
     - time make -j16
     - time xvfb-run -a ctest -j16 --output-on-failure
     - time make package_source
@@ -49,6 +50,7 @@ debian_oldstable_py38:
     - pyenv global 3.8
   stage: build
   script: &docker_build
+    - export CHECK_FLAGS=""
     - ORIGINAL_DIR=$(pwd)
     - export CC=gcc; export CXX=g++
     - export MPLBACKEND=Agg