Merge pull request #4500 from jon-turney/azure-vs2015

Add azure jobs for vs2015
pull/4524/head
Jussi Pakkanen 6 years ago committed by GitHub
commit 27ff79e026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      azure-pipelines.yml
  2. 54
      ci/azure-steps.yml

@ -4,37 +4,37 @@ trigger:
branches: branches:
include: include:
- 'master' - 'master'
# Release branches
- '0.*'
variables: variables:
MESON_FIXED_NINJA: 1 MESON_FIXED_NINJA: 1
CI: 1 CI: 1
jobs: jobs:
#- job: vs2015 - job: vs2015
# pool: pool:
# vmImage: vs2015-win2012r2 vmImage: vs2015-win2012r2
#
# strategy: strategy:
# maxParallel: 10 matrix:
# matrix: vc2015x86ninja:
# vc2015x86ninja: arch: x86
# arch: x86 compiler: msvc2015
# compiler: msvc2015 backend: ninja
# backend: ninja vc2015x86vs:
# vc2015x86vs: arch: x86
# arch: x86 compiler: msvc2015
# compiler: msvc2015 backend: vs2015
# backend: vs2015
# steps:
# steps: - template: ci/azure-steps.yml
# - template: ci/azure-steps.yml
- job: vs2017 - job: vs2017
pool: pool:
vmImage: VS2017-Win2016 vmImage: VS2017-Win2016
strategy: strategy:
maxParallel: 10
matrix: matrix:
vc2017x64ninja: vc2017x64ninja:
arch: x64 arch: x64

@ -1,10 +1,5 @@
steps: steps:
- powershell: | - 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 python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin
if ($LastExitCode -ne 0) { if ($LastExitCode -ne 0) {
throw ('error in skip_ci.py') 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 '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/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 DownloadFile -Source 'https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe' -Destination MSMpiSetup.exe
if ($env:compiler -ne 'msvc2015') {
Start-Process msiexec.exe -ArgumentList '/i msmpisdk.msi /quiet' -Wait 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 Start-Process .\MSMpiSetup.exe -ArgumentList '-unattend -full' -Wait
}
# import ms-mpi env vars (set by installer) # import ms-mpi env vars (set by installer)
foreach ($p in "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64") { foreach ($p in "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64") {
@ -45,20 +43,40 @@ steps:
Set-Content "env:$p" "$v" 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 # add downloads to PATH
$env:Path = "$env:SYSTEM_WORKFOLDER;$env:Path" $env:Path = "$env:SYSTEM_WORKFOLDER;$env:Path"
$origPath = $env:Path $origPath = $env:Path
# import visual studio variables # import visual studio variables
if ($env:compiler -eq 'msvc2015') { if ($env:compiler -eq 'msvc2015') {
$vsver = $env:compiler.Replace('msvc', '') $vcvars = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
} else { } else {
$vsver = '2017' $vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
}
## 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]
}
} }
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Remove-Item $tempFile
Install-Module Pscx -Scope CurrentUser -AllowClobber
Install-Module VSSetup -Scope CurrentUser
Import-VisualStudioVars -VisualStudioVersion $vsver -Architecture $(arch)
if ($env:compiler -eq 'clang-cl') { if ($env:compiler -eq 'clang-cl') {
# drop visual studio from PATH # drop visual studio from PATH
@ -88,30 +106,26 @@ steps:
MSBuild /version MSBuild /version
} }
python run_tests.py --backend $(backend) where.exe python
python --version
echo "##vso[task.setvariable variable=test_status]$LastExitCode"
continueOnError: true python run_tests.py --backend $(backend)
- task: PublishTestResults@2 - task: PublishTestResults@2
inputs: inputs:
testResultsFiles: meson-test-run.xml testResultsFiles: meson-test-run.xml
testRunTitle: $(System.JobName) testRunTitle: $(System.JobName)
publishRunAttachments: true publishRunAttachments: true
condition: not(canceled())
- task: CopyFiles@2 - task: CopyFiles@2
inputs: inputs:
contents: 'meson-test-run.*' contents: 'meson-test-run.*'
targetFolder: $(Build.ArtifactStagingDirectory) targetFolder: $(Build.ArtifactStagingDirectory)
condition: not(canceled())
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: inputs:
artifactName: $(System.JobName) artifactName: $(System.JobName)
# publishing artifacts from PRs from a fork is currently blocked # publishing artifacts from PRs from a fork is currently blocked
condition: eq(variables['system.pullrequest.isfork'], false) condition: eq(variables['system.pullrequest.isfork'], false)
- powershell: |
# after publishing test results, even if some failed
# exit with the test status
exit $(test_status)

Loading…
Cancel
Save