aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-11-15 22:48:32 +0200
committerGitHub <noreply@github.com>2018-11-15 22:48:32 +0200
commit27ff79e026387ebcc657d9c1521b41674ecc2dca (patch)
tree759747832767fed4306c2c7d43b672338f4d1e0d
parentc104251d2ef1ca1c4b8caea52fa6ab2da1dbaefe (diff)
parenteab97e0c4441923c2cb09838488da0f34dab497a (diff)
downloadmeson-27ff79e026387ebcc657d9c1521b41674ecc2dca.zip
meson-27ff79e026387ebcc657d9c1521b41674ecc2dca.tar.gz
meson-27ff79e026387ebcc657d9c1521b41674ecc2dca.tar.bz2
Merge pull request #4500 from jon-turney/azure-vs2015
Add azure jobs for vs2015
-rw-r--r--azure-pipelines.yml38
-rw-r--r--ci/azure-steps.yml58
2 files changed, 55 insertions, 41 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 5f7e3c4..9cc01a1 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -4,37 +4,37 @@ trigger:
branches:
include:
- 'master'
+ # Release branches
+ - '0.*'
variables:
MESON_FIXED_NINJA: 1
CI: 1
jobs:
-#- job: vs2015
-# pool:
-# vmImage: vs2015-win2012r2
-#
-# strategy:
-# maxParallel: 10
-# matrix:
-# vc2015x86ninja:
-# arch: x86
-# compiler: msvc2015
-# backend: ninja
-# vc2015x86vs:
-# arch: x86
-# compiler: msvc2015
-# backend: vs2015
-#
-# steps:
-# - template: ci/azure-steps.yml
+- job: vs2015
+ pool:
+ vmImage: vs2015-win2012r2
+
+ strategy:
+ matrix:
+ vc2015x86ninja:
+ arch: x86
+ compiler: msvc2015
+ backend: ninja
+ vc2015x86vs:
+ arch: x86
+ compiler: msvc2015
+ backend: vs2015
+
+ steps:
+ - template: ci/azure-steps.yml
- job: vs2017
pool:
vmImage: VS2017-Win2016
strategy:
- maxParallel: 10
matrix:
vc2017x64ninja:
arch: x64
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml
index 6303761..8bd8c76 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')
@@ -36,8 +31,11 @@ steps:
DownloadFile -Source 'http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe' -Destination $(System.WorkFolder)\pkg-config.exe
DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi' -Destination msmpisdk.msi
DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe' -Destination MSMpiSetup.exe
- Start-Process msiexec.exe -ArgumentList '/i msmpisdk.msi /quiet' -Wait
- Start-Process .\MSMpiSetup.exe -ArgumentList '-unattend -full' -Wait
+ if ($env:compiler -ne 'msvc2015') {
+ Start-Process msiexec.exe -ArgumentList '/i msmpisdk.msi /quiet' -Wait
+ # installer fails "requires an interactive window station" with vs2015 image
+ Start-Process .\MSMpiSetup.exe -ArgumentList '-unattend -full' -Wait
+ }
# import ms-mpi env vars (set by installer)
foreach ($p in "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64") {
@@ -45,20 +43,40 @@ 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"
$origPath = $env:Path
# import visual studio variables
if ($env:compiler -eq 'msvc2015') {
- $vsver = $env:compiler.Replace('msvc', '')
+ $vcvars = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
} else {
- $vsver = '2017'
+ $vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
}
- Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
- Install-Module Pscx -Scope CurrentUser -AllowClobber
- Install-Module VSSetup -Scope CurrentUser
- Import-VisualStudioVars -VisualStudioVersion $vsver -Architecture $(arch)
+
+ ## ask cmd.exe to output the environment table after the batch file completes
+ $tempFile = [IO.Path]::GetTempFileName()
+ cmd /c " `"$vcvars`" $env:arch && set > `"$tempFile`" "
+
+ ## go through the environment variables in the temp file.
+ ## for each of them, set the variable in our local environment.
+ Get-Content $tempFile | Foreach-Object {
+ if($_ -match "^(.*?)=(.*)$") {
+ Set-Content "env:\$($matches[1])" $matches[2]
+ }
+ }
+ Remove-Item $tempFile
if ($env:compiler -eq 'clang-cl') {
# drop visual studio from PATH
@@ -88,30 +106,26 @@ steps:
MSBuild /version
}
- python run_tests.py --backend $(backend)
-
- echo "##vso[task.setvariable variable=test_status]$LastExitCode"
+ where.exe python
+ python --version
- continueOnError: true
+ python run_tests.py --backend $(backend)
- task: PublishTestResults@2
inputs:
testResultsFiles: meson-test-run.xml
testRunTitle: $(System.JobName)
publishRunAttachments: true
+ condition: not(canceled())
- task: CopyFiles@2
inputs:
contents: 'meson-test-run.*'
targetFolder: $(Build.ArtifactStagingDirectory)
+ condition: not(canceled())
- task: PublishBuildArtifacts@1
inputs:
artifactName: $(System.JobName)
# publishing artifacts from PRs from a fork is currently blocked
condition: eq(variables['system.pullrequest.isfork'], false)
-
-- powershell: |
- # after publishing test results, even if some failed
- # exit with the test status
- exit $(test_status)