diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-11-08 18:39:56 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-11-13 16:13:44 +0000 |
commit | 5ec4da7829e27325661448240db14be59053f54b (patch) | |
tree | 4b690d7df0d3c1b28f0b8facb26ccbe49342bfeb /ci | |
parent | 9bd2132cfa62c53b8ec902ebe9469ea57a121eb4 (diff) | |
download | meson-5ec4da7829e27325661448240db14be59053f54b.zip meson-5ec4da7829e27325661448240db14be59053f54b.tar.gz meson-5ec4da7829e27325661448240db14be59053f54b.tar.bz2 |
azure: Install python3 for vs2015 image
We can't run the standard python installer on the vs2015 image, so we
use an installation of chocolately python3 instead
Diffstat (limited to 'ci')
-rw-r--r-- | ci/azure-steps.yml | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml index 4090458..1c7e125 100644 --- a/ci/azure-steps.yml +++ b/ci/azure-steps.yml @@ -1,10 +1,5 @@ steps: - powershell: | - # test_find_program exercises some behaviour which relies on .py being in PATHEXT - $env:PATHEXT += ';.py' - - where.exe python - python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin if ($LastExitCode -ne 0) { throw ('error in skip_ci.py') @@ -45,6 +40,17 @@ steps: Set-Content "env:$p" "$v" } + # download and install python3 and add to path (since it's not installed in vs2015 image!) + if ($env:compiler -eq 'msvc2015') { + Set-ExecutionPolicy Bypass -Scope Process -Force + iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + choco install python3 -y --no-progress --params "/InstallDir:C:\Python3" + $env:Path = "C:\Python3;$env:Path" + } + + # test_find_program exercises some behaviour which relies on .py being in PATHEXT + $env:PATHEXT += ';.py' + # add downloads to PATH $env:Path = "$env:SYSTEM_WORKFOLDER;$env:Path" @@ -97,6 +103,9 @@ steps: MSBuild /version } + where.exe python + python --version + python run_tests.py --backend $(backend) echo "##vso[task.setvariable variable=test_status]$LastExitCode" |