Migrate macOS pipelines to macOS-10.15

This commit is contained in:
Mikhail Koliada 2021-12-17 12:17:25 +03:00
parent 5aa825ba9f
commit e9b568c830
3 changed files with 12 additions and 16 deletions

View File

@ -6,7 +6,7 @@ stages:
- stage: Build_Python_MacOS
dependsOn: []
variables:
VmImage: 'macOS-10.14'
VmImage: 'macOS-10.15'
Platform: darwin
Architecture: x64
jobs:
@ -16,7 +16,7 @@ stages:
condition: succeeded()
dependsOn: Build_Python_MacOS
variables:
VmImage: 'macOS-10.14'
VmImage: 'macOS-10.15'
Platform: darwin
Architecture: x64
jobs:

View File

@ -1,6 +1,6 @@
jobs:
- job: Test_Python
pool:
pool:
name: Azure Pipelines
vmImage: $(VmImage)
variables:

View File

@ -22,6 +22,13 @@ class macOSPythonBuilder : NixPythonBuilder {
[string] $platform
) : Base($version, $architecture, $platform) { }
[void] PrepareEnvironment() {
<#
.SYNOPSIS
Prepare system environment by installing dependencies and required packages.
#>
}
[void] Configure() {
<#
.SYNOPSIS
@ -40,8 +47,8 @@ class macOSPythonBuilder : NixPythonBuilder {
### and then add the appropriate paths for the header and library files to configure command.
### Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
if ($this.Version -lt "3.7.0") {
$env:LDFLAGS = "-L/usr/local/opt/openssl@1.1/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include"
$env:LDFLAGS = "-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include"
} else {
$configureString += " --with-openssl=/usr/local/opt/openssl@1.1"
}
@ -57,15 +64,4 @@ class macOSPythonBuilder : NixPythonBuilder {
Execute-Command -Command $configureString
}
[void] PrepareEnvironment() {
<#
.SYNOPSIS
Prepare system environment by installing dependencies and required packages.
#>
### reinstall header files to Avoid issue with X11 headers on Mojave
$pkgName = "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg"
Execute-Command -Command "sudo installer -pkg $pkgName -target /"
}
}