From 592cf19f358bf76177db6734031175569d8ca0f9 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 24 Apr 2024 11:14:53 +0200
Subject: [PATCH] CI Win modify PATH and PYTHONPATH for ctest command only

---
 .gitlab-ci.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a937898e405..f171da6613a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -108,9 +108,6 @@ windows:
     - $QTCMake_DIR = "$QT_MSVC_DIR/lib/cmake"
     - $PY_PLATFORM_DIR = "C:/Users/admin/.pyenv/pyenv-win/versions/3.11.5/"
     - $BUILD_DIR = "build"
-    # change the system PATH temporarily (needed for tests)
-    - $env:PYTHONPATH += "$CI_PROJECT_DIR/build/lib"
-    - $env:PATH = "$QT_MSVC_DIR/bin;$env:PATH"
     # list powershell properties
     - echo "# Path '<$Env:Path>'"
     - echo "# PythonPath '<$Env:PYTHONPATH>'"
@@ -136,7 +133,10 @@ windows:
     - pwd
     - if($CI_PIPELINE_SOURCE -eq "schedule") { cmake --build . --target clean; echo "redundant target purge done" }
     - cmake --build . -j20 --config Release
-    - ctest -C Release --parallel 20 --output-on-failure
+    - |
+      $env:PYTHONPATH += "$CI_PROJECT_DIR/build/lib";
+      $env:PATH = "$QT_MSVC_DIR/bin;$env:PATH";
+      ctest -C Release --parallel 20 --output-on-failure
     - cpack -C Release -B ./installer .
   artifacts:
     paths:
-- 
GitLab