Skip to content
Snippets Groups Projects
Commit de3fd7b7 authored by Tristan Laurent's avatar Tristan Laurent Committed by Thibaut ROMAIN
Browse files

COMP: add Python to path in after_script of windows jobs

parent fc766c76
No related branches found
No related tags found
1 merge request!1015Add Spot5 SWH support to otb9
Pipeline #15973 canceled
......@@ -236,6 +236,8 @@ stages:
- git checkout -f -q $CI_COMMIT_SHA
# Obviously Windows does not use same executable name as linux...
after_script:
# need to setup path to be able to use python
- . "CI\setup_python.ps1" x64
- python -u CI/cdash_handler.py
# - Win10
......
#
# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
......@@ -74,9 +74,11 @@ $Global:HOMEPATH="\Users\otbbot"
#)
echo "Home dir: $HOMEDRIVE$HOMEPATH"
# Get the folder of current script
$SCRIPT_DIR=Split-Path $MyInvocation.MyCommand.Path -Parent
# Setup Python
$env:PATH="C:\tools\Python310-$ARCH;$env:PATH"
$env:PATH="C:\tools\Python310-$ARCH\Scripts;$env:PATH"
. "$SCRIPT_DIR\setup_python.ps1" $ARCH
# Setup GL dlls
$env:PATH="$env:PATH;C:\tools\GL\$ARCH\bin"
......@@ -88,8 +90,6 @@ $env:PATH="$env:PATH;C:\tools\GL\$ARCH\bin"
# see official M$ answer saying they wont do the job:
# https://developercommunity.visualstudio.com/t/Provide-a-PowerShell-version-of-vcvarsal/10238319
# Get the folder of current script
$SCRIPT_DIR=Split-Path $MyInvocation.MyCommand.Path -Parent
. "$SCRIPT_DIR\Invoke-CmdScript.ps1"
......
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if ( $args.count -lt 1 ) {
echo "No arch"
echo "Usage: $0 <compiler_arch>"
echo " <compiler_arch> : 'x86' | 'x64'"
Break
}
$ARCH=$args[0]
$env:PATH="C:\tools\Python310-$ARCH;$env:PATH"
$env:PATH="C:\tools\Python310-$ARCH\Scripts;$env:PATH"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment