Skip to content

Commit

Permalink
Merge branch 'main' into urls
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Dec 29, 2023
2 parents 0e177fd + f108468 commit eea029d
Show file tree
Hide file tree
Showing 4,771 changed files with 1,005,316 additions and 479,518 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
124 changes: 5 additions & 119 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,151 +1,37 @@
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: xcode9-macos10.13

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.1c

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.1c

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: 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
46 changes: 0 additions & 46 deletions .azure-pipelines/docs-steps.yml

This file was deleted.

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

This file was deleted.

1 change: 1 addition & 0 deletions .azure-pipelines/posix-deps-apt.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
apt-get update

apt-get -yq install \
Expand Down
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 eea029d

Please sign in to comment.