mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
142 lines
3.6 KiB
YAML
142 lines
3.6 KiB
YAML
# This pipeline is used to run PR validation and CI builds against the debugpy public repo.
|
|
# Seperate internal pipelines are used for generating wheels, signing, and releasing to pypi.org
|
|
|
|
# Trigger ci builds for commits into master and any release branches
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
- release/*
|
|
|
|
# Trigger pr builds for commits into master and any release branches
|
|
# Ignore draft PR's
|
|
pr:
|
|
branches:
|
|
include:
|
|
- main
|
|
- release/*
|
|
drafts: "false"
|
|
|
|
variables:
|
|
architecture: "x64"
|
|
|
|
jobs:
|
|
|
|
- job: "Lint"
|
|
timeoutInMinutes: "5"
|
|
displayName: "Lint"
|
|
pool: { vmImage: "ubuntu-latest" }
|
|
|
|
variables:
|
|
python.version: "3.8"
|
|
|
|
steps:
|
|
|
|
- template: "templates/use_python.yml"
|
|
|
|
# Install and run ruff
|
|
# See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/
|
|
- script: "python3 -m pip install -U ruff"
|
|
displayName: "Install ruff"
|
|
|
|
# We just switched to a new linter and there are a ton of errors. We need time to go through them, but we don't want the block the build.
|
|
# Therefore, we use continueOnError to generate a warning while there are linter errors. The build will still run.
|
|
# To force the step to return zero even with linter errors, add "--exit-zero" after the "check" in the command line
|
|
- script: "python3 -m ruff check --format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml ."
|
|
displayName: "Run ruff"
|
|
continueOnError: "true"
|
|
|
|
- task: "PublishTestResults@2"
|
|
displayName: "Publish linting results"
|
|
inputs:
|
|
testRunTitle: "$(Agent.JobName)"
|
|
testResultsFiles: "lint-*.xml"
|
|
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
|
condition: "always()"
|
|
|
|
- job: "Test_Linux"
|
|
timeoutInMinutes: "30"
|
|
displayName: "Tests - Linux"
|
|
pool: { vmImage: "ubuntu-latest" }
|
|
|
|
strategy:
|
|
matrix:
|
|
py37:
|
|
python.version: "3.7"
|
|
py38:
|
|
python.version: "3.8"
|
|
py39:
|
|
python.version: "3.9"
|
|
py310:
|
|
python.version: "3.10"
|
|
py311:
|
|
python.version: "3.11"
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
sudo apt-get update
|
|
sudo apt-get --yes install gdb
|
|
sudo sysctl kernel.yama.ptrace_scope=0
|
|
displayName: "Setup gdb"
|
|
|
|
- template: "templates/use_python.yml"
|
|
|
|
- template: "templates/run_tests.yml"
|
|
|
|
- job: "Test_MacOS"
|
|
timeoutInMinutes: "30"
|
|
displayName: "Tests - macOS"
|
|
pool: { vmImage: "macOS-11" }
|
|
|
|
strategy:
|
|
matrix:
|
|
py37:
|
|
python.version: "3.7"
|
|
py38:
|
|
python.version: "3.8"
|
|
py39:
|
|
python.version: "3.9"
|
|
py310:
|
|
python.version: "3.10"
|
|
py311:
|
|
python.version: "3.11"
|
|
|
|
steps:
|
|
|
|
- script: "ulimit -Sn 8192"
|
|
displayName: "Increase file descriptor limit"
|
|
|
|
- template: "templates/use_python.yml"
|
|
|
|
- script: "python -m ensurepip --user"
|
|
displayName: "Bootstrap pip"
|
|
|
|
- template: "templates/run_tests.yml"
|
|
|
|
- job: "Test_Windows"
|
|
timeoutInMinutes: "40"
|
|
displayName: "Tests - Windows"
|
|
pool: { vmImage: "windows-latest" }
|
|
|
|
strategy:
|
|
matrix:
|
|
py37:
|
|
python.version: "3.7"
|
|
py38:
|
|
python.version: "3.8"
|
|
py39:
|
|
python.version: "3.9"
|
|
py39_32:
|
|
python.version: "3.9"
|
|
architecture: "x86"
|
|
py310:
|
|
python.version: "3.10"
|
|
py311:
|
|
python.version: "3.11"
|
|
|
|
steps:
|
|
|
|
- template: "templates/use_python.yml"
|
|
|
|
- template: "templates/run_tests.yml"
|