Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shihai1991 committed Aug 4, 2022
2 parents fdad367 + 7b370b7 commit 76eeee2
Show file tree
Hide file tree
Showing 3,934 changed files with 634,311 additions and 271,808 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
61 changes: 14 additions & 47 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
variables:
manylinux: false
coverage: false

resources:
containers:
- container: manylinux1
image: pyca/cryptography-manylinux1:x86_64
trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']

jobs:
- job: Prebuild
displayName: Pre-build checks

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

steps:
- template: ./prebuild-checks.yml
Expand All @@ -24,7 +20,7 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

steps:
- template: ./docs-steps.yml
Expand All @@ -35,14 +31,16 @@ jobs:
- job: macOS_CI_Tests
displayName: macOS CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
# bpo-39837: macOS tests on Azure Pipelines are disabled
condition: false

variables:
testRunTitle: '$(build.sourceBranchName)-macos'
testRunPlatform: macos

pool:
vmImage: xcode9-macos10.13
vmImage: macos-10.15

steps:
- template: ./macos-steps.yml
Expand All @@ -54,50 +52,19 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1c
openssl_version: 1.1.1n

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt


- job: ManyLinux1_CI_Tests
displayName: ManyLinux1 CI Tests
dependsOn: Prebuild
condition: |
and(
and(
succeeded(),
eq(variables['manylinux'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)
pool:
vmImage: ubuntu-16.04

container: manylinux1

variables:
testRunTitle: '$(build.sourceBranchName)-manylinux1'
testRunPlatform: manylinux1
openssl_version: ''

steps:
- template: ./posix-steps.yml
parameters:
dependencies: yum
sudo_dependencies: ''
xvfb: false
patchcheck: false


- job: Ubuntu_Coverage_CI_Tests
displayName: Ubuntu CI Tests (coverage)
dependsOn: Prebuild
Expand All @@ -111,12 +78,12 @@ jobs:
)
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1c
openssl_version: 1.1.1n

steps:
- template: ./posix-steps.yml
Expand All @@ -131,21 +98,21 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016
vmImage: windows-2022

strategy:
matrix:
win32:
arch: win32
buildOpt:
buildOpt: '-p Win32'
testRunTitle: '$(Build.SourceBranchName)-win32'
testRunPlatform: win32
win64:
arch: amd64
buildOpt: '-p x64'
testRunTitle: '$(Build.SourceBranchName)-win64'
testRunPlatform: win64
maxParallel: 2
maxParallel: 4

steps:
- template: ./windows-steps.yml
Expand Down
9 changes: 5 additions & 4 deletions .azure-pipelines/docs-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ steps:
inputs:
versionSpec: '>=3.6'

- script: python -m pip install sphinx==2.0.1 blurb python-docs-theme
- script: python -m pip install -r requirements.txt
workingDirectory: '$(build.sourcesDirectory)/Doc'
displayName: 'Install build dependencies'

- ${{ if ne(parameters.latex, 'true') }}:
- script: make check suspicious html PYTHON=python
- script: make check html PYTHON=python
workingDirectory: '$(build.sourcesDirectory)/Doc'
displayName: 'Build documentation'

- ${{ if eq(parameters.latex, 'true') }}:
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
displayName: 'Install LaTeX'

- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'
Expand All @@ -31,7 +32,7 @@ steps:
- ${{ if eq(parameters.upload, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: 'Publish docs'

inputs:
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
ArtifactName: docs
Expand Down
26 changes: 26 additions & 0 deletions .azure-pipelines/find-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Locate a set of the tools used for builds

steps:
- template: windows-release/find-sdk.yml
parameters:
toolname: 'signtool.exe'

- powershell: |
$vcvarsall = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-prerelease `
-latest `
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
-find VC\Auxiliary\Build\vcvarsall.bat)
Write-Host "Found vcvarsall at $vcvarsall"
Write-Host "##vso[task.setVariable variable=vcvarsall]$vcvarsall"
displayName: 'Find vcvarsall.bat'
- powershell: |
$msbuild = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-prerelease `
-latest `
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
-find MSBuild\Current\Bin\msbuild.exe)
Write-Host "Found MSBuild at $msbuild"
Write-Host "##vso[task.setVariable variable=msbuild]$msbuild"
displayName: 'Find MSBuild'
86 changes: 86 additions & 0 deletions .azure-pipelines/libffi-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)

variables:
IntDir: '$(Build.BinariesDirectory)'
OutDir: '$(Build.ArtifactStagingDirectory)'

# MUST BE SET AT QUEUE TIME
# SigningCertificate: 'Python Software Foundation'
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
# SourceTag: 'libffi-3.4.2'

jobs:
- job: Build_LibFFI
displayName: LibFFI
pool:
vmImage: windows-latest

workspace:
clean: all

steps:
- checkout: none

- template: ./find-tools.yml

- powershell: |
mkdir -Force "$(IntDir)\script"
iwr "https://github.com/python/cpython/raw/main/PCbuild/prepare_libffi.bat" `
-outfile "$(IntDir)\script\prepare_libffi.bat"
displayName: 'Download build script'
- powershell: |
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 -c core.autocrlf=false -c core.eol=lf .
displayName: 'Check out LibFFI sources'
- script: 'prepare_libffi.bat --install-cygwin'
workingDirectory: '$(IntDir)\script'
displayName: 'Install Cygwin and build'
env:
VCVARSALL: '$(vcvarsall)'
LIBFFI_SOURCE: '$(Build.SourcesDirectory)'
LIBFFI_OUT: '$(OutDir)'

- powershell: |
if ((gci *\*.dll).Count -lt 4) {
Write-Error "Did not generate enough DLL files"
}
if ((gci *\Include\ffi.h).Count -lt 4) {
Write-Error "Did not generate enough include files"
}
failOnStderr: true
workingDirectory: '$(OutDir)'
displayName: 'Verify files were created'
- publish: '$(OutDir)'
artifact: 'unsigned'
displayName: 'Publish unsigned build'

- job: Sign_LibFFI
displayName: Sign LibFFI
dependsOn: Build_LibFFI
pool:
name: 'Windows Release'

workspace:
clean: all

steps:
- checkout: none
- download: current
artifact: unsigned

- template: ./find-tools.yml

- powershell: |
signtool sign /q /a `
/n "Python Software Foundation" `
/fd sha256 `
/tr http://timestamp.digicert.com/ /td sha256 `
/d "LibFFI for Python" `
(gci "$(Pipeline.Workspace)\unsigned\*.dll" -r)
displayName: 'Sign files'
- publish: '$(Pipeline.Workspace)\unsigned'
artifact: 'libffi'
displayName: 'Publish libffi'
4 changes: 3 additions & 1 deletion .azure-pipelines/macos-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ steps:
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
displayName: 'Configure CPython (debug)'

- script: make -s -j4
- script: make -j4
displayName: 'Build CPython'

- script: make pythoninfo
displayName: 'Display build info'

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
continueOnError: true
timeoutInMinutes: 30

- task: PublishTestResults@2
displayName: 'Publish Test Results'
Expand Down
Loading

0 comments on commit 76eeee2

Please sign in to comment.