forked from ConorMacBride/mcalf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
100 lines (93 loc) · 2.95 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
variables:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: ConorMacBride
name: OpenAstronomy/azure-pipelines-templates
trigger:
branches:
include:
- main
tags:
include:
- 'v*'
stages:
- stage: StageOneTests
displayName: Basic Tests
jobs:
- template: check-skip.yml@OpenAstronomy
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.9'
coverage: codecov
posargs: -n=4
envs:
- linux: py39
- stage: StageTwoTests
displayName: Detailed Tests
condition: or(and(succeeded(), ne(dependencies.StageOneTests.outputs['check_skip.search.found'], 'true')), eq(variables['Build.Reason'], 'Manual'))
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.9'
coverage: codecov
posargs: -n=4
envs:
- linux: py37
- linux: py38
- macos: py39
- windows: py39
- linux: py37-oldestdeps
- stage: FigureTests
displayName: Figure Tests
condition: or(and(succeeded(), ne(dependencies.StageOneTests.outputs['check_skip.search.found'], 'true')), eq(variables['Build.Reason'], 'Manual'))
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.9'
coverage: codecov
posargs: -n=4
envs:
- linux: py39-figure
- macos: py39-figure
- windows: py39-figure
# RELEASING A VERSION: Run more detailed tests if releasing a version (or if triggered manually)
- ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.Reason'], 'Manual')) }}:
- stage: PreReleaseTests
displayName: Pre-release Tests
condition: or(succeeded(), eq(variables['Build.Reason'], 'Manual'))
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.9'
coverage: codecov
posargs: -n=4
envs:
- macos: py37
- macos: py38
- windows: py37
- windows: py38
- macos: py37-oldestdeps
- windows: py37-oldestdeps
# Don't build sdist and wheels for PRs
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- stage: Release
condition: or(succeeded(), eq(variables['Build.Reason'], 'Manual'))
jobs:
- template: publish.yml@OpenAstronomy
parameters:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
pypi_connection_name: 'pypi_endpoint'
pypi_endpoint_name: 'mcalf'
libraries:
- libfftw3-dev
test_extras: "tests"
test_command: pytest --pyargs mcalf
targets:
- sdist
- wheels_cp3[7-9]-macosx_x86_64
- wheels_cp3[7-9]-manylinux*
- wheels_cp3[7-9]-win_amd64