-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathazure-pipelines.yml
138 lines (135 loc) · 4.78 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
variables:
CIBW_SKIP: pp* cp27-* *_i686 *-win32 *musllinux*
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_TEST_COMMAND: python -m amplpy.tests
CIBW_TEST_REQUIRES: --index-url https://pypi.ampl.com --extra-index-url https://pypi.org/simple ampl_module_base ampl_module_highs ampl_module_gurobi pandas numpy
CIBW_TEST_REQUIRES_AARCH64: --index-url https://pypi.ampl.com --extra-index-url https://pypi.org/simple ampl_module_base ampl_module_highs
CIBW_TEST_REQUIRES_PPC64LE: --index-url https://pypi.ampl.com --extra-index-url https://pypi.org/simple ampl_module_base
stages:
- stage: native
displayName: 'Build native'
jobs:
- job: docs
pool: {vmImage: 'Ubuntu-20.04'}
steps:
- task: UsePythonVersion@0
- bash: |
set -ex
python dev/updatelib.py
python -m pip install setuptools cython
python -m pip install .
python setup.py sdist -d upload
cd docs
pip install -r requirements-dev.txt --upgrade
make html
cd ..
mkdir -p upload/doc
cp -r docs/build/html upload/doc/python
displayName: Build documentation
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'upload'}
- job: manylinux
pool: {vmImage: 'Ubuntu-20.04'}
steps:
- task: UsePythonVersion@0
- bash: |
set -ex
python dev/updatelib.py
python -m pip install --upgrade cibuildwheel==2.21.3
cibuildwheel --platform linux --output-dir wheelhouse .
displayName: Build wheels
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- job: macos
pool: {vmImage: 'macos-latest'}
steps:
- task: UsePythonVersion@0
- bash: |
set -ex
python dev/updatelib.py
python -m pip install --upgrade cibuildwheel==2.21.3
cibuildwheel --platform macos --output-dir wheelhouse .
displayName: Build wheels
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- job: windows
pool: {vmImage: 'windows-2022'}
steps:
- task: UsePythonVersion@0
- bash: |
set -ex
python dev/updatelib.py
python -m pip install --upgrade cibuildwheel==2.21.3
cibuildwheel --platform windows --output-dir wheelhouse .
displayName: Build wheels
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- stage: qemu
displayName: 'Build with QEMU'
jobs:
- job: qemu
pool: {vmImage: 'Ubuntu-20.04'}
strategy:
matrix:
aarch64 cp36:
CIBW_BUILD: cp36-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp37:
CIBW_BUILD: cp37-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp38:
CIBW_BUILD: cp38-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp39:
CIBW_BUILD: cp39-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp310:
CIBW_BUILD: cp310-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp311:
CIBW_BUILD: cp311-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp312:
CIBW_BUILD: cp312-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
aarch64 cp313:
CIBW_BUILD: cp313-*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: $(CIBW_TEST_REQUIRES_AARCH64)
steps:
- task: UsePythonVersion@0
- bash: docker run --rm --privileged docker.io/tonistiigi/binfmt:qemu-v8.1.5 --install all
displayName: Configure qemu (temp solution until qemu fix)
- bash: |
set -ex
python dev/updatelib.py
python -m pip install --upgrade cibuildwheel==2.21.3
cibuildwheel --platform linux --output-dir wheelhouse .
displayName: Build wheels
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- stage: publish
jobs:
- job: upload
pool: {vmImage: 'ubuntu-latest'}
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadPath: 'artifacts/'
artifactName: 'drop'
displayName: 'Download current pipeline artifacts'
- bash: mv artifacts/drop artifacts/amplpy
displayName: Rename directory
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'artifacts/'
artifact: 'release'
artifactType: 'pipeline'