-
Notifications
You must be signed in to change notification settings - Fork 26
add azure CI, temporarily disable others #107
Changes from all commits
4702432
fb450b9
9b2dd12
3fca188
36e7cde
6e1c6b0
b9213e7
47b811f
4adda6f
61155fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,50 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
schedules: | ||
- cron: "27 3 * * 0" | ||
# 3:27am UTC every Sunday | ||
displayName: Weekly build | ||
branches: | ||
include: | ||
- master | ||
always: true | ||
|
||
trigger: | ||
- main | ||
pr: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
variables: | ||
BUILD_COMMIT: "master" | ||
|
||
steps: | ||
- script: echo Hello, world! | ||
displayName: 'Run a one-line script' | ||
jobs: | ||
- template: azure-posix.yml | ||
parameters: | ||
name: linux | ||
vmImage: ubuntu-18.04 | ||
matrix: | ||
amd64-linux-py39: | ||
MB_PYTHON_VERSION: "3.9" | ||
32bit-amd64-linux-py39: | ||
MB_PYTHON_VERSION: "3.9" | ||
PLAT: "i686" | ||
amd64-linux-py38: | ||
MB_PYTHON_VERSION: "3.8" | ||
32bit-amd64-linux-py38: | ||
MB_PYTHON_VERSION: "3.8" | ||
PLAT: "i686" | ||
amd64-linux-py37: | ||
MB_PYTHON_VERSION: "3.7" | ||
32bit-amd64-linux-py37: | ||
MB_PYTHON_VERSION: "3.7" | ||
PLAT: "i686" | ||
|
||
- script: | | ||
echo Add other tasks to build, test, and deploy your project. | ||
echo See https://aka.ms/yaml | ||
displayName: 'Run a multi-line script' | ||
- template: azure-posix.yml | ||
parameters: | ||
name: macOS | ||
vmImage: macOS-10.14 | ||
matrix: | ||
osx-Py37: | ||
MB_PYTHON_VERSION: "3.7" | ||
osx-Py38: | ||
MB_PYTHON_VERSION: "3.8" | ||
MB_PYTHON_OSX_VER: "10.9" | ||
osx-Py39: | ||
MB_PYTHON_VERSION: "3.9" | ||
MB_PYTHON_OSX_VER: "10.9" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
parameters: | ||
name: "" | ||
vmImage: "" | ||
matrix: [] | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
variables: | ||
REPO_DIR: "scipy" | ||
PLAT: "x86_64" | ||
NIGHTLY_BUILD_COMMIT: "master" | ||
DAILY_COMMIT: "master" | ||
strategy: | ||
matrix: | ||
${{ insert }}: ${{ parameters.matrix }} | ||
|
||
steps: | ||
- checkout: self | ||
submodules: true | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: $(AZURE_PYTHON_VERSION) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When is this version of the I guess There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not from multibuild. Let me try to delete those steps. It came from MacPython/numpy-wheels#99, I think the comment "There is a problem with the Azure linux builds: for some reason it is setting the python version in the host machine even though that is not needed. I have a fix for that." was relevant but I cannot recall what it means. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it was from a time where the default python is 2.7, so we need to set something, but could not set 3.9 because Azure did not have it yet? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is needed for macOSx |
||
displayName: Set python version from AZURE | ||
condition: ne( coalesce (variables['AZURE_PYTHON_VERSION'], 'NONE'), 'NONE') | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: $(MB_PYTHON_VERSION) | ||
displayName: Set python version from MB | ||
condition: eq( coalesce (variables['AZURE_PYTHON_VERSION'], 'NONE'), 'NONE') | ||
|
||
- bash: | | ||
set -e | ||
|
||
if [ "$BUILD_REASON" == "Schedule" ]; then | ||
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT | ||
fi | ||
echo "Building scipy@$BUILD_COMMIT" | ||
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" | ||
|
||
# Platform variables used in multibuild scripts | ||
if [ `uname` == 'Darwin' ]; then | ||
echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]osx" | ||
echo "##vso[task.setvariable variable=MACOSX_DEPLOYMENT_TARGET]10.9" | ||
else | ||
echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]linux" | ||
fi | ||
|
||
# Store original Python path to be able to create test_venv pointing | ||
# to same Python version. | ||
PYTHON_EXE=`which python` | ||
echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE" | ||
displayName: Define build env variables | ||
|
||
- bash: | | ||
set -e | ||
echo building for commit "$BUILD_COMMIT" | ||
pip install --upgrade virtualenv wheel setuptools | ||
BUILD_DEPENDS="wheel oldest-supported-numpy Cython>=0.29.18 pybind11>=2.4.3" | ||
|
||
source multibuild/common_utils.sh | ||
source multibuild/travis_steps.sh | ||
|
||
before_install | ||
|
||
clean_code $REPO_DIR $BUILD_COMMIT | ||
./patch_code.sh $REPO_DIR | ||
build_wheel $REPO_DIR $PLAT | ||
displayName: Build wheel | ||
|
||
- bash: | | ||
set -xe | ||
TEST_DEPENDS="oldest-supported-numpy pytest pytest-xdist pytest-faulthandler pytest-env" | ||
source multibuild/common_utils.sh | ||
source multibuild/travis_steps.sh | ||
source extra_functions.sh | ||
install_run $PLAT | ||
displayName: Install wheel and test | ||
|
||
- bash: | | ||
echo "##vso[task.prependpath]$CONDA/bin" | ||
sudo chown -R $USER $CONDA | ||
displayName: Add conda to PATH | ||
|
||
- bash: conda install -q -y anaconda-client | ||
displayName: Install anaconda-client | ||
|
||
- bash: | | ||
set -e | ||
if [ "$BUILD_COMMIT" == "master" ]; then | ||
ANACONDA_ORG="scipy-wheels-nightly" | ||
TOKEN="$MAPPED_SCIPY_NIGHTLY_UPLOAD_TOKEN" | ||
else | ||
ANACONDA_ORG="multibuild-wheels-staging" | ||
TOKEN="$MAPPED_SCIPY_STAGING_UPLOAD_TOKEN" | ||
fi | ||
if [ "$TOKEN" == "" -o "${TOKEN:0:7}" == "\$(NUMPY" ]; then | ||
echo "##[warning] Could not find anaconda.org upload token in secret variables" | ||
TOKEN="" | ||
fi | ||
echo "##vso[task.setvariable variable=TOKEN]$TOKEN" | ||
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" | ||
displayName: Retrieve secret upload token | ||
env: | ||
# Secret variables need to mapped to env variables explicitly: | ||
MAPPED_SCIPY_NIGHTLY_UPLOAD_TOKEN: $(SCIPY_NIGHTLY_UPLOAD_TOKEN) | ||
MAPPED_SCIPY_STAGING_UPLOAD_TOKEN: $(SCIPY_STAGING_UPLOAD_TOKEN) | ||
|
||
- bash: | | ||
set -e | ||
if [ $ANACONDA_ORG == "scipy-wheels-nightly" ]; then | ||
source extra_functions.sh | ||
for f in wheelhouse/*.whl; do rename_wheel $f; done | ||
fi | ||
|
||
echo uploading wheelhouse/*.whl | ||
|
||
anaconda -t $TOKEN upload -u $ANACONDA_ORG wheelhouse/*.whl | ||
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" | ||
displayName: Upload to anaconda.org (only if secret token is retrieved) | ||
condition: ne(variables['TOKEN'], '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still used by a line that hasn't been deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I reverted this change and changed the
NP_*
requirement useoldest-supported-numpy
instead, like on azure.