Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Oct 31, 2023
2 parents b3d3c08 + 2445673 commit e9b8aad
Show file tree
Hide file tree
Showing 1,687 changed files with 85,732 additions and 46,336 deletions.
69 changes: 1 addition & 68 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
variables:
coverage: false

trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
trigger: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']

jobs:
- job: Prebuild
Expand All @@ -14,70 +11,6 @@ jobs:
- template: ./prebuild-checks.yml


- job: macOS_CI_Tests
displayName: macOS CI Tests
dependsOn: Prebuild
#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: macos-10.15

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-22.04

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

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


- 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-22.04

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

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


- job: Windows_CI_Tests
displayName: Windows CI Tests
dependsOn: Prebuild
Expand Down
27 changes: 0 additions & 27 deletions .azure-pipelines/macos-steps.yml

This file was deleted.

73 changes: 8 additions & 65 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,7 +7,7 @@ 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
Expand All @@ -23,61 +16,11 @@ steps:
- 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) -y .github/codecov.yml
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: |
git fetch origin
./python Tools/patchcheck/patchcheck.py --ci 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'))
89 changes: 3 additions & 86 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
variables:
coverage: false

pr: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
pr: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']

jobs:
- job: Prebuild
Expand All @@ -14,28 +11,8 @@ jobs:
- template: ./prebuild-checks.yml


- job: macOS_PR_Tests
displayName: macOS PR Tests
dependsOn: Prebuild
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
# bpo-39837: macOS tests on Azure Pipelines are disabled
condition: false

variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-macos'
testRunPlatform: macos

pool:
vmImage: macos-10.15

steps:
- template: ./macos-steps.yml
parameters:
targetBranch: $(System.PullRequest.TargetBranch)


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

Expand All @@ -49,63 +26,3 @@ jobs:

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


- job: Ubuntu_Coverage_PR_Tests
displayName: Ubuntu PR Tests (coverage)
dependsOn: Prebuild
condition: |
and(
and(
succeeded(),
eq(variables['coverage'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)
pool:
vmImage: ubuntu-22.04

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

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


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

pool:
vmImage: windows-2022

strategy:
matrix:
win32:
arch: win32
buildOpt: '-p Win32'
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
testRunPlatform: win32
win64:
arch: amd64
buildOpt: '-p x64'
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
testRunPlatform: win64
winarm64:
arch: arm64
buildOpt: '-p arm64'
maxParallel: 4

steps:
- template: ./windows-steps.yml
parameters:
targetBranch: $(System.PullRequest.TargetBranch)
3 changes: 3 additions & 0 deletions .cirrus.yml → .cirrus-DISABLED.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# gh-91960: Job disabled since Python is out of free credit (September 2023):
# https://discuss.python.org/t/freebsd-gets-a-new-cirrus-ci-github-action-job-and-a-new-buildbot/33122/26

freebsd_task:
freebsd_instance:
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ indent_style = space
[*.{py,c,cpp,h}]
indent_size = 4

[*.rst]
indent_size = 3

[*.yml]
indent_size = 2
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Doc/c-api/stable.rst @encukou

**/*idlelib* @terryjreedy

**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
**/*typing* @gvanrossum @JelleZijlstra @AlexWaygood

**/*ftplib @giampaolo
**/*shutil @giampaolo
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ body:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "CPython main branch"
validations:
required: true
Expand Down
Loading

0 comments on commit e9b8aad

Please sign in to comment.