forked from astropy/astropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
88 lines (78 loc) · 3.09 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
# NOTE: this Azure configuration is used only for building the sdist and wheels.
# It uses the OpenAstronomy azure template described in detail at
# https://openastronomy-azure-pipelines.readthedocs.io/en/latest/
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: astropy
name: OpenAstronomy/azure-pipelines-templates
ref: master
# NOTE: for now we only use Azure Pipelines on v* branches, tags, and main
# only on a cron for building the source and wheel distributions. If you want to
# make changes to this configuration via a pull request, you can *temporarily*
# change the pr branches include trigger to just '*'
trigger:
branches:
include:
- 'v*'
- main
tags:
include:
- 'v*'
pr:
branches:
include:
- 'v*'
schedules:
- cron: "0 0 * * *"
displayName: Daily Build for Nightly Wheels
branches:
include:
- main
always: true
# Build Linux wheels using manylinux1 for compatibility with old versions
# of pip and old platforms.
variables:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CI: true
jobs:
# Run this job on non-main branches (when triggered) or if we are on main and on the cron, or if manually triggered through the web ui.
- ${{ if or(ne(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')) }}:
- template: publish.yml@OpenAstronomy
parameters:
# FIXME: we exclude the test_data_out_of_range test since it
# currently fails, see https://github.com/astropy/astropy/issues/10409
test_command: pytest -p no:warnings --astropy-header -k "not test_data_out_of_range and not test_datetime_difference_agrees_with_timedelta and not test_wcsapi_extension and not test_timedelta_datetime_roundtrip" --pyargs astropy
test_extras: test
# NOTE: for v* tags, we auto-release to PyPI. See
# https://openastronomy-azure-pipelines.readthedocs.io/en/latest/publish.html
# for information on how to configure things on the Azure Pipelines side
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
pypi_connection_name : 'pypi_endpoint'
# If the build has run on main then upload the artifacts to the nightly feed
${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
artifact_project : 'astropy'
artifact_feed : 'nightly'
remove_local_scheme: true
targets:
- sdist
# The linux builds are the fastest so run all in one job
- wheels_cp3[789]*linux_i686
- wheels_cp3[789]*linux_x86_64
# macos is a little slower so split it into two
- wheels_cp37*macosx_x86_64
- wheels_cp38*macosx_x86_64
- wheels_cp39*macosx_x86_64
# windows is the slowest, so do one python version per build
- wheels_cp37*win32
- wheels_cp37*win_amd64
- wheels_cp38*win32
- wheels_cp38*win_amd64
- wheels_cp39*win32
- wheels_cp39*win_amd64
# We always need to specify a job, so always run a do nothing.
- job: skipping
steps:
- checkout: none