Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 223b156

Browse files
authored
Merge pull request #107 from mattip/azure-pipelines
add azure CI, temporarily disable others
2 parents a7a8eaf + 61155fe commit 223b156

File tree

4 files changed

+178
-101
lines changed

4 files changed

+178
-101
lines changed

.travis.yml renamed to _travis.yml.backup

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ env:
44
# Also see DAILY_COMMIT below
55
- BUILD_COMMIT=master
66
- PLAT=x86_64
7-
- NP_BUILD_DEP="numpy==1.16.5"
87
- CYTHON_BUILD_DEP="Cython==0.29.18"
98
- PYBIND11_BUILD_DEP="pybind11==2.4.3"
10-
- NP_TEST_DEP="numpy==1.16.5"
119
- UNICODE_WIDTH=32
1210
- MANYLINUX_URL="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
1311
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
@@ -38,7 +36,6 @@ jobs:
3836
env:
3937
- MB_PYTHON_VERSION=3.7
4038
- PLAT=aarch64
41-
- NP_BUILD_DEP=numpy==1.19.1
4239
- CYTHON_BUILD_DEP="Cython"
4340
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
4441
script:
@@ -59,7 +56,6 @@ jobs:
5956
env:
6057
- MB_PYTHON_VERSION=3.8
6158
- PLAT=aarch64
62-
- NP_BUILD_DEP=numpy==1.19.1
6359
- CYTHON_BUILD_DEP="Cython"
6460
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
6561
script:
@@ -80,7 +76,6 @@ jobs:
8076
env:
8177
- MB_PYTHON_VERSION=3.9
8278
- PLAT=aarch64
83-
- NP_BUILD_DEP=numpy==1.19.1
8479
- CYTHON_BUILD_DEP="Cython"
8580
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
8681
script:
@@ -92,77 +87,6 @@ jobs:
9287
- wheelhouse
9388
after_success:
9489
- echo "This stage will not upload aarch64 wheel"
95-
- os: linux
96-
name: amd64-Linux-Py39
97-
env:
98-
- MB_PYTHON_VERSION=3.9
99-
- NP_BUILD_DEP=numpy==1.19.1
100-
- NP_TEST_DEP=numpy==1.19.1
101-
- os: linux
102-
name: 32bit-amd64-Linux-Py39
103-
env:
104-
- MB_PYTHON_VERSION=3.9
105-
- PLAT=i686
106-
- NP_BUILD_DEP=numpy==1.19.3
107-
- NP_TEST_DEP=numpy==1.19.3
108-
- os: linux
109-
name: amd64-Linux-Py37
110-
env:
111-
- MB_PYTHON_VERSION=3.7
112-
- NP_BUILD_DEP=numpy==1.16.5
113-
- NP_TEST_DEP=numpy==1.16.5
114-
- CYTHON_BUILD_DEP="Cython"
115-
- os: linux
116-
name: amd64-Linux-Py38
117-
env:
118-
- MB_PYTHON_VERSION=3.8
119-
- NP_BUILD_DEP=numpy==1.17.3
120-
- NP_TEST_DEP=numpy==1.17.3
121-
- CYTHON_BUILD_DEP="Cython"
122-
- os: linux
123-
name: 32bit-amd64-Linux-Py38
124-
env:
125-
- MB_PYTHON_VERSION=3.8
126-
- PLAT=i686
127-
- NP_BUILD_DEP=numpy==1.17.3
128-
- NP_TEST_DEP=numpy==1.17.3
129-
- CYTHON_BUILD_DEP="Cython"
130-
- os: linux
131-
name: 32bit-amd64-Linux-Py37
132-
env:
133-
- MB_PYTHON_VERSION=3.7
134-
- PLAT=i686
135-
- NP_BUILD_DEP=numpy==1.16.5
136-
- NP_TEST_DEP=numpy==1.16.5
137-
- CYTHON_BUILD_DEP="Cython"
138-
- os: osx
139-
name: osx-Py37
140-
language: generic
141-
env:
142-
- MB_PYTHON_VERSION=3.7
143-
- NP_BUILD_DEP=numpy==1.16.5
144-
- NP_TEST_DEP=numpy==1.16.5
145-
- CYTHON_BUILD_DEP="Cython"
146-
- os: osx
147-
name: osx-Py38
148-
language: generic
149-
osx_image: xcode10.1
150-
env:
151-
- MB_PYTHON_VERSION=3.8
152-
- NP_BUILD_DEP=numpy==1.17.3
153-
- NP_TEST_DEP=numpy==1.17.3
154-
- CYTHON_BUILD_DEP="Cython"
155-
- MB_PYTHON_OSX_VER=10.9
156-
- os: osx
157-
name: osx-Py39
158-
language: generic
159-
osx_image: xcode10.1
160-
env:
161-
- MB_PYTHON_VERSION=3.9
162-
- NP_BUILD_DEP=numpy==1.19.1
163-
- NP_TEST_DEP=numpy==1.19.1
164-
- CYTHON_BUILD_DEP="Cython"
165-
- MB_PYTHON_OSX_VER=10.9
16690

16791
- stage: Test wheel
16892
name: ARM64-Linux-Py37
@@ -173,7 +97,6 @@ jobs:
17397
env:
17498
- MB_PYTHON_VERSION=3.7
17599
- PLAT=aarch64
176-
- NP_TEST_DEP=numpy==1.19.1
177100
- CYTHON_BUILD_DEP="Cython"
178101
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
179102
workspaces:
@@ -188,7 +111,6 @@ jobs:
188111
env:
189112
- MB_PYTHON_VERSION=3.9
190113
- PLAT=aarch64
191-
- NP_TEST_DEP=numpy==1.19.1
192114
- CYTHON_BUILD_DEP="Cython"
193115
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
194116
workspaces:
@@ -203,7 +125,6 @@ jobs:
203125
env:
204126
- MB_PYTHON_VERSION=3.8
205127
- PLAT=aarch64
206-
- NP_TEST_DEP=numpy==1.19.1
207128
- CYTHON_BUILD_DEP="Cython"
208129
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
209130
workspaces:
@@ -219,8 +140,8 @@ before_install:
219140
CONTAINER=wheels;
220141
UPLOAD_ARGS="--no-update-index";
221142
fi
222-
- BUILD_DEPENDS="$NP_BUILD_DEP $CYTHON_BUILD_DEP $PYBIND11_BUILD_DEP"
223-
- TEST_DEPENDS="$NP_TEST_DEP pytest pytest-xdist pytest-faulthandler pytest-env"
143+
- BUILD_DEPENDS="wheel oldest-supported-numpy $CYTHON_BUILD_DEP $PYBIND11_BUILD_DEP"
144+
- TEST_DEPENDS="oldest-supported-numpy pytest pytest-xdist pytest-faulthandler pytest-env"
224145
- source multibuild/common_utils.sh
225146
- source multibuild/travis_steps.sh
226147
- before_install

azure-pipelines.yml

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
1-
# Starter pipeline
2-
# Start with a minimal pipeline that you can customize to build and deploy your code.
3-
# Add steps that build, run tests, deploy, and more:
4-
# https://aka.ms/yaml
1+
schedules:
2+
- cron: "27 3 * * 0"
3+
# 3:27am UTC every Sunday
4+
displayName: Weekly build
5+
branches:
6+
include:
7+
- master
8+
always: true
59

6-
trigger:
7-
- main
10+
pr:
11+
- master
812

9-
pool:
10-
vmImage: 'ubuntu-latest'
13+
variables:
14+
BUILD_COMMIT: "master"
1115

12-
steps:
13-
- script: echo Hello, world!
14-
displayName: 'Run a one-line script'
16+
jobs:
17+
- template: azure-posix.yml
18+
parameters:
19+
name: linux
20+
vmImage: ubuntu-18.04
21+
matrix:
22+
amd64-linux-py39:
23+
MB_PYTHON_VERSION: "3.9"
24+
32bit-amd64-linux-py39:
25+
MB_PYTHON_VERSION: "3.9"
26+
PLAT: "i686"
27+
amd64-linux-py38:
28+
MB_PYTHON_VERSION: "3.8"
29+
32bit-amd64-linux-py38:
30+
MB_PYTHON_VERSION: "3.8"
31+
PLAT: "i686"
32+
amd64-linux-py37:
33+
MB_PYTHON_VERSION: "3.7"
34+
32bit-amd64-linux-py37:
35+
MB_PYTHON_VERSION: "3.7"
36+
PLAT: "i686"
1537

16-
- script: |
17-
echo Add other tasks to build, test, and deploy your project.
18-
echo See https://aka.ms/yaml
19-
displayName: 'Run a multi-line script'
38+
- template: azure-posix.yml
39+
parameters:
40+
name: macOS
41+
vmImage: macOS-10.14
42+
matrix:
43+
osx-Py37:
44+
MB_PYTHON_VERSION: "3.7"
45+
osx-Py38:
46+
MB_PYTHON_VERSION: "3.8"
47+
MB_PYTHON_OSX_VER: "10.9"
48+
osx-Py39:
49+
MB_PYTHON_VERSION: "3.9"
50+
MB_PYTHON_OSX_VER: "10.9"

azure-posix.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
parameters:
2+
name: ""
3+
vmImage: ""
4+
matrix: []
5+
6+
jobs:
7+
- job: ${{ parameters.name }}
8+
pool:
9+
vmImage: ${{ parameters.vmImage }}
10+
variables:
11+
REPO_DIR: "scipy"
12+
PLAT: "x86_64"
13+
NIGHTLY_BUILD_COMMIT: "master"
14+
DAILY_COMMIT: "master"
15+
strategy:
16+
matrix:
17+
${{ insert }}: ${{ parameters.matrix }}
18+
19+
steps:
20+
- checkout: self
21+
submodules: true
22+
23+
- task: UsePythonVersion@0
24+
inputs:
25+
versionSpec: $(AZURE_PYTHON_VERSION)
26+
displayName: Set python version from AZURE
27+
condition: ne( coalesce (variables['AZURE_PYTHON_VERSION'], 'NONE'), 'NONE')
28+
29+
- task: UsePythonVersion@0
30+
inputs:
31+
versionSpec: $(MB_PYTHON_VERSION)
32+
displayName: Set python version from MB
33+
condition: eq( coalesce (variables['AZURE_PYTHON_VERSION'], 'NONE'), 'NONE')
34+
35+
- bash: |
36+
set -e
37+
38+
if [ "$BUILD_REASON" == "Schedule" ]; then
39+
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
40+
fi
41+
echo "Building scipy@$BUILD_COMMIT"
42+
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
43+
44+
# Platform variables used in multibuild scripts
45+
if [ `uname` == 'Darwin' ]; then
46+
echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]osx"
47+
echo "##vso[task.setvariable variable=MACOSX_DEPLOYMENT_TARGET]10.9"
48+
else
49+
echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]linux"
50+
fi
51+
52+
# Store original Python path to be able to create test_venv pointing
53+
# to same Python version.
54+
PYTHON_EXE=`which python`
55+
echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE"
56+
displayName: Define build env variables
57+
58+
- bash: |
59+
set -e
60+
echo building for commit "$BUILD_COMMIT"
61+
pip install --upgrade virtualenv wheel setuptools
62+
BUILD_DEPENDS="wheel oldest-supported-numpy Cython>=0.29.18 pybind11>=2.4.3"
63+
64+
source multibuild/common_utils.sh
65+
source multibuild/travis_steps.sh
66+
67+
before_install
68+
69+
clean_code $REPO_DIR $BUILD_COMMIT
70+
./patch_code.sh $REPO_DIR
71+
build_wheel $REPO_DIR $PLAT
72+
displayName: Build wheel
73+
74+
- bash: |
75+
set -xe
76+
TEST_DEPENDS="oldest-supported-numpy pytest pytest-xdist pytest-faulthandler pytest-env"
77+
source multibuild/common_utils.sh
78+
source multibuild/travis_steps.sh
79+
source extra_functions.sh
80+
install_run $PLAT
81+
displayName: Install wheel and test
82+
83+
- bash: |
84+
echo "##vso[task.prependpath]$CONDA/bin"
85+
sudo chown -R $USER $CONDA
86+
displayName: Add conda to PATH
87+
88+
- bash: conda install -q -y anaconda-client
89+
displayName: Install anaconda-client
90+
91+
- bash: |
92+
set -e
93+
if [ "$BUILD_COMMIT" == "master" ]; then
94+
ANACONDA_ORG="scipy-wheels-nightly"
95+
TOKEN="$MAPPED_SCIPY_NIGHTLY_UPLOAD_TOKEN"
96+
else
97+
ANACONDA_ORG="multibuild-wheels-staging"
98+
TOKEN="$MAPPED_SCIPY_STAGING_UPLOAD_TOKEN"
99+
fi
100+
if [ "$TOKEN" == "" -o "${TOKEN:0:7}" == "\$(NUMPY" ]; then
101+
echo "##[warning] Could not find anaconda.org upload token in secret variables"
102+
TOKEN=""
103+
fi
104+
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
105+
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
106+
displayName: Retrieve secret upload token
107+
env:
108+
# Secret variables need to mapped to env variables explicitly:
109+
MAPPED_SCIPY_NIGHTLY_UPLOAD_TOKEN: $(SCIPY_NIGHTLY_UPLOAD_TOKEN)
110+
MAPPED_SCIPY_STAGING_UPLOAD_TOKEN: $(SCIPY_STAGING_UPLOAD_TOKEN)
111+
112+
- bash: |
113+
set -e
114+
if [ $ANACONDA_ORG == "scipy-wheels-nightly" ]; then
115+
source extra_functions.sh
116+
for f in wheelhouse/*.whl; do rename_wheel $f; done
117+
fi
118+
119+
echo uploading wheelhouse/*.whl
120+
121+
anaconda -t $TOKEN upload -u $ANACONDA_ORG wheelhouse/*.whl
122+
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
123+
displayName: Upload to anaconda.org (only if secret token is retrieved)
124+
condition: ne(variables['TOKEN'], '')

config.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,22 @@ function run_tests {
6969
local testmode="fast"
7070
fi
7171
# Check bundled license file
72-
python ../check_installed_package.py
72+
$PYTHON_EXE ../check_installed_package.py
7373
# Run tests
7474
if [[ -z "$IS_OSX" && `uname -m` != 'aarch64' ]]; then
75-
python ../run_scipy_tests.py $testmode -- -n2 -rfEX
75+
$PYTHON_EXE ../run_scipy_tests.py $testmode -- -n2 -rfEX
7676
else
77-
python ../run_scipy_tests.py $testmode -- -n8 -rfEX
77+
$PYTHON_EXE ../run_scipy_tests.py $testmode -- -n8 -rfEX
7878
fi
7979
# Show BLAS / LAPACK used
80-
python -c 'import scipy; scipy.show_config()'
80+
$PYTHON_EXE -c 'import scipy; scipy.show_config()'
8181
}
8282

8383
function install_run {
8484
# Override multibuild test running command, to preinstall packages
8585
# that have to be installed before TEST_DEPENDS.
86-
pip install $(pip_opts) setuptools_scm
86+
PIP_CMD="$PYTHON_EXE -m pip"
87+
$PYTHON_EXE -m pip install $(pip_opts) setuptools_scm
8788

8889
# Copypaste from multibuild/common_utils.sh:install_run
8990
install_wheel

0 commit comments

Comments
 (0)