This repository was archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
add azure CI, temporarily disable others #107
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4702432
add azure CI, temporarily disable others
mattip fb450b9
remove cruft from numpy-wheels
mattip 9b2dd12
add TEST_DEPENDS
mattip 3fca188
depend on pyproject.toml for build, move TEST_DEPENDS
mattip 36e7cde
use BUILD_DEPENDS copied from pyproject.toml
mattip 6e1c6b0
upgrade setuptools, add more verbose scripting
mattip b9213e7
use PYTHON_EXE not python
mattip 47b811f
define PIP_CMD
mattip 4adda6f
add tokens, remove linux. macos from travis
mattip 61155fe
tweak travis.yml backup, revive appveyor.yml
mattip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
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_NUMPY_NIGHTLY_UPLOAD_TOKEN" | ||
else | ||
ANACONDA_ORG="multibuild-wheels-staging" | ||
TOKEN="$MAPPED_NUMPY_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_NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) | ||
MAPPED_NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_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'], '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When is this version of the
UsePythonVersion
task used? It looks like we always set the one forMB_PYTHON_VERSION
below in any case?I guess
AZURE_PYTHON_VERSION
is something I don't understand yet--is it built-in to Azure or coming from multibuild?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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed for macOSx