forked from sunpy/sunraster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
113 lines (105 loc) · 2.98 KB
/
azure-pipelines.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
variables:
CI_NAME: Azure Pipelines
CI_BUILD_ID: $(Build.BuildId)
CI_BUILD_URL: "https://dev.azure.com/sunpy/sunraster/_build/results?buildId=$(Build.BuildId)"
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: sunpy
name: OpenAstronomy/azure-pipelines-templates
ref: master
trigger:
branches:
include:
- '*'
exclude:
- '*backport*'
tags:
include:
- 'v*'
exclude:
- '*dev*'
- '*pre*'
- '*post*'
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true
pr:
autoCancel: true
stages:
- stage: FirstPhaseTests
displayName: Core Tests
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
envs:
- linux: py310
- stage: SecondPhaseTests
displayName: Stage 2 Tests
dependsOn: FirstPhaseTests
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
libraries:
apt:
- graphviz
envs:
- macos: py38
- windows: py39
- linux: build_docs
posargs: " "
pytest: false
- linux: py39-online
- linux: py38-oldestdeps
- ${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')) }}:
- stage: CronTests
displayName: Cron Tests
dependsOn: [] # Don't wait on other stages
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
libraries:
yum:
- openssl-devel
- freetype-devel
- libpng-devel
- hdf5-devel
envs:
- linux: py38-devdeps
# On branches which aren't main, and not Pull Requests, build the wheels but only upload them on tags
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), or(ne(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))) }}:
- stage: Release
dependsOn: SecondPhaseTests
jobs:
- template: publish.yml@OpenAstronomy
parameters:
# Only Upload to PyPI on tags
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
pypi_connection_name : 'PyPI'
test_extras: 'dev'
test_command: 'pytest -p no:warnings --doctest-rst -m "not figure" --pyargs sunraster'
submodules: false
targets:
- wheels_universal
- sdist