-
Notifications
You must be signed in to change notification settings - Fork 215
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
74 lines (65 loc) · 2.13 KB
/
azure-pipelines.yml
File metadata and controls
74 lines (65 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# PR gate and branch CI for the msal Python package.
# Runs on pushes to dev/azure-pipelines, on all pull requests, and on a daily schedule.
# Delegates all stages to .Pipelines/template-pipeline-stages.yml with
# runPublish: false — PreBuildCheck (SDL scans) + CI (test matrix) only.
trigger:
- dev
- azure-pipelines
pr:
branches:
include:
- '*'
schedules:
- cron: '45 7 * * *' # 07:45 UTC daily (11:45 PM PST / 12:45 AM PDT) — matches legacy MSAL-Python-SDL-CI schedule
displayName: 'Daily SDL + CI (dev)'
branches:
include:
- dev
always: false # only run when there are new changes
stages:
- template: .Pipelines/template-pipeline-stages.yml
parameters:
runPublish: false
- stage: Benchmark
displayName: 'Run benchmarks'
dependsOn: CI
# Only run on post-merge pushes to dev — not on PRs or scheduled runs.
# Benchmarks are noisy and the baseline cache is only meaningful on a stable branch.
condition: |
and(
succeeded('CI'),
eq(variables['Build.SourceBranch'], 'refs/heads/dev'),
or(
eq(variables['Build.Reason'], 'IndividualCI'),
eq(variables['Build.Reason'], 'BatchedCI'),
eq(variables['Build.Reason'], 'Manual')
)
)
jobs:
- job: Benchmark
displayName: 'Performance benchmarks (Python 3.9)'
pool:
vmImage: ubuntu-latest
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
displayName: 'Set up Python 3.9'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
displayName: 'Install dependencies'
- task: Cache@2
displayName: 'Restore performance baseline cache'
inputs:
key: '"perf-baseline" | "$(Agent.OS)" | tests/test_benchmark.py'
path: .perf.baseline
- bash: |
pytest --benchmark-only --benchmark-json benchmark.json --log-cli-level INFO tests/test_benchmark.py
displayName: 'Run benchmarks'
- task: PublishPipelineArtifact@1
displayName: 'Publish benchmark results'
condition: succeededOrFailed()
inputs:
targetPath: 'benchmark.json'
artifact: 'benchmark-results'