Browse Source

ci: Factor out helper to load python into environment on Windows

Brad King 3 years ago
parent
commit
1ccffcf0ea
2 changed files with 5 additions and 3 deletions
  1. 4 0
      .gitlab/ci/python-env.ps1
  2. 1 3
      .gitlab/os-windows.yml

+ 4 - 0
.gitlab/ci/python-env.ps1

@@ -0,0 +1,4 @@
+$pwdpath = $pwd.Path
+cmake -P .gitlab/ci/download_python3.cmake
+Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python3;$env:PATH"
+python --version

+ 1 - 3
.gitlab/os-windows.yml

@@ -305,9 +305,7 @@
     - (& "$env:WIX\bin\light.exe" -help) | Select -First 1
     - cmake --version
     - . .gitlab/ci/qt-env.ps1
-    - cmake -P .gitlab/ci/download_python3.cmake
-    - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python3;$env:PATH"
-    - python --version
+    - . .gitlab/ci/python-env.ps1
 
 .cmake_build_windows:
     stage: build