Skip to content

Commit

Permalink
Merge branch 'python:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonroy authored May 2, 2024
2 parents 43b6283 + a37b093 commit 6f4e966
Show file tree
Hide file tree
Showing 4,872 changed files with 1,073,802 additions and 507,434 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
122 changes: 4 additions & 118 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,143 +1,29 @@
variables:
manylinux: false
coverage: false

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

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

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-22.04

steps:
- template: ./prebuild-checks.yml


- job: Docs_PR
displayName: Docs PR
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))

pool:
vmImage: ubuntu-16.04

steps:
- template: ./docs-steps.yml
parameters:
upload: true


- job: macOS_CI_Tests
displayName: macOS CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

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

pool:
vmImage: macos-10.14

steps:
- template: ./macos-steps.yml


- job: Ubuntu_CI_Tests
displayName: Ubuntu CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-16.04

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

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
condition: |
and(
and(
succeeded(),
eq(variables['coverage'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)
pool:
vmImage: ubuntu-16.04

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

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


- job: Windows_CI_Tests
displayName: Windows CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: windows-2019
vmImage: windows-2022

strategy:
matrix:
win32:
arch: win32
buildOpt:
buildOpt: '-p Win32'
testRunTitle: '$(Build.SourceBranchName)-win32'
testRunPlatform: win32
win64:
Expand Down
46 changes: 0 additions & 46 deletions .azure-pipelines/docs-steps.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .azure-pipelines/macos-steps.yml

This file was deleted.

73 changes: 9 additions & 64 deletions .azure-pipelines/posix-steps.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
parameters:
coverage: false
sudo_dependencies: sudo
dependencies: apt
patchcheck: true
xvfb: true

steps:
- checkout: self
clean: true
Expand All @@ -14,68 +7,20 @@ steps:
- script: sudo setfacl -Rb /home/vsts
displayName: 'Workaround ACL issue'

- script: ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
- script: sudo ./.azure-pipelines/posix-deps-apt.sh $(openssl_version)
displayName: 'Install dependencies'

- script: ./configure --with-pydebug
displayName: 'Configure CPython (debug)'

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

- ${{ if eq(parameters.coverage, 'true') }}:
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
displayName: 'Set up virtual environment'

- script: ./venv/bin/python -m test.pythoninfo
displayName: 'Display build info'

- script: |
$COMMAND -m coverage run --pylib -m test \
--fail-env-changed \
-uall,-cpu \
--junit-xml=$(build.binariesDirectory)/test-results.xml \
-x test_multiprocessing_fork \
-x test_multiprocessing_forkserver \
-x test_multiprocessing_spawn \
-x test_concurrent_futures
displayName: 'Tests with coverage'
env:
${{ if eq(parameters.xvfb, 'true') }}:
COMMAND: xvfb-run ./venv/bin/python
${{ if ne(parameters.xvfb, 'true') }}:
COMMAND: ./venv/bin/python
- script: ./venv/bin/python -m coverage xml
displayName: 'Generate coverage.xml'

- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
displayName: 'Publish code coverage results'


- ${{ if ne(parameters.coverage, 'true') }}:
- script: make pythoninfo
displayName: 'Display build info'

- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
env:
${{ if eq(parameters.xvfb, 'true') }}:
COMMAND: xvfb-run make
${{ if ne(parameters.xvfb, 'true') }}:
COMMAND: make

- ${{ if eq(parameters.patchcheck, 'true') }}:
- script: ./python Tools/scripts/patchcheck.py --travis true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))

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

- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
mergeTestResults: true
testRunTitle: $(testRunTitle)
platform: $(testRunPlatform)
condition: succeededOrFailed()
- script: |
git fetch origin
./python Tools/patchcheck/patchcheck.py --ci true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
Loading

0 comments on commit 6f4e966

Please sign in to comment.