This repository was archived by the owner on May 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Build on Azure pipelines and upload to anaconda.org #74
Merged
TomAugspurger
merged 21 commits into
MacPython:master
from
TomAugspurger:azure-pipelines
Mar 16, 2020
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f04bd46
Use azure
TomAugspurger ed309e7
bump multibuild
TomAugspurger 8981d05
pasta
TomAugspurger 87b9b30
ci-3
TomAugspurger dc8803b
ci-4
TomAugspurger 9a08e31
remove vendor_vc_comp.py
TomAugspurger 2a3cd1d
ename
TomAugspurger 5d9016c
install wheel
TomAugspurger 3d9c4cf
trigger ci
TomAugspurger cebac42
pytest command
TomAugspurger ad8158f
windows test
TomAugspurger 8f69458
skip maybe_promote
TomAugspurger 71fded9
skip maybe_promote
TomAugspurger 63777a5
re-use
TomAugspurger 103afc4
re-use
TomAugspurger 906ae90
org
TomAugspurger 672c966
Merge remote-tracking branch 'upstream/master' into azure-pipelines
TomAugspurger 2237f79
fixups
TomAugspurger 711d60c
fixups
TomAugspurger 9ebfdbc
debug
TomAugspurger 23a993b
pin multibuild
TomAugspurger 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.
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,92 @@ | ||
environment: | ||
global: | ||
REPO_DIR: pandas | ||
PACKAGE_NAME: pandas | ||
BUILD_COMMIT: v1.0.0 | ||
BUILDWHEEL: "True" | ||
BUILD_DEPENDS: "hdf5 numpy>=1.9.3 numexpr>=2.6.2 six cython bzip2" | ||
TEST_DEPENDS: "numpy>=1.9.3 numexpr>=2.6.2 six>=1.9.0 mock" | ||
DISABLE_AVX2: "True" # do not include AVX2 in this build | ||
WHEELHOUSE_UPLOADER_USERNAME: travis-worker | ||
WHEELHOUSE_UPLOADER_SECRET: | ||
secure: | ||
9s0gdDGnNnTt7hvyNpn0/ZzOMGPdwPp2SewFTfGzYk7uI+rdAN9rFq2D1gAP4NQh | ||
|
||
matrix: | ||
- PYTHON: "C:\\Miniconda35" | ||
PYTHON_VERSION: "3.5" | ||
PYTHON_ARCH: "32" | ||
- PYTHON: "C:\\Miniconda35-x64" | ||
PYTHON_VERSION: "3.5" | ||
PYTHON_ARCH: "64" | ||
- PYTHON: "C:\\Miniconda36" | ||
PYTHON_VERSION: "3.6" | ||
PYTHON_ARCH: "32" | ||
- PYTHON: "C:\\Miniconda36-x64" | ||
PYTHON_VERSION: "3.6" | ||
PYTHON_ARCH: "64" | ||
- PYTHON: "C:\\Miniconda37" | ||
PYTHON_VERSION: "3.7" | ||
PYTHON_ARCH: "32" | ||
- PYTHON: "C:\\Miniconda37-x64" | ||
PYTHON_VERSION: "3.7" | ||
PYTHON_ARCH: "64" | ||
|
||
|
||
# We always use a 64-bit machine, but can build x86 distributions | ||
# with the PYTHON_ARCH variable. | ||
platform: | ||
- x64 | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
install: | ||
# Fetch submodules | ||
- git submodule update --init --recursive | ||
|
||
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PATH% | ||
- conda info | ||
|
||
# Check that we have the expected version and architecture for Python | ||
- python --version | ||
- python -c "import struct; print(struct.calcsize('P') * 8)" | ||
|
||
build_script: | ||
# Install build requirements | ||
- conda create --yes -n build_env python=%PYTHON_VERSION% %BUILD_DEPENDS% | ||
- activate build_env | ||
|
||
# FIXME update Cython for python 3.5 | ||
- pip install -U cython | ||
|
||
# Additional pre install steps: | ||
- set BZIP2_DIR=%CONDA_PREFIX%\Library\ | ||
|
||
# build wheel: | ||
- cd %REPO_DIR% | ||
- git checkout %BUILD_COMMIT% | ||
- python setup.py bdist_wheel | ||
|
||
test_script: | ||
# create test env | ||
- conda create --yes -n test_env python=%PYTHON_VERSION% %TEST_DEPENDS% | ||
- activate test_env | ||
|
||
# install from wheel | ||
- pip install --no-index --find-links dist/ %PACKAGE_NAME% | ||
|
||
- cd .. | ||
- python -m tables.tests.test_all | ||
|
||
artifacts: | ||
- path: "%REPO_DIR%\\dist\\*" | ||
|
||
on_success: | ||
# Upload the generated wheel package to Rackspace | ||
# On Windows, Apache Libcloud cannot find a standard CA cert bundle so we | ||
# disable the ssl checks. | ||
- cd %REPO_DIR% | ||
- pip install wheelhouse-uploader | ||
- python -m wheelhouse_uploader upload | ||
--no-ssl-check --local-folder=dist --no-update-index wheels |
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,86 @@ | ||
schedules: | ||
- cron: "27 3 */1 * *" | ||
# 3:27am UTC everyday | ||
displayName: Nighthly build | ||
branches: | ||
include: | ||
- master | ||
always: true | ||
|
||
jobs: | ||
- template: azure/windows.yml | ||
parameters: | ||
name: windows | ||
vmImage: vs2017-win2016 | ||
matrix: | ||
py_3.6_32: | ||
PYTHON_VERSION: "3.6.x" | ||
PYTHON_ARCH: "x86" | ||
NP_BUILD_DEP: "1.13.3" | ||
py_3.6_64: | ||
PYTHON_VERSION: "3.6.x" | ||
NP_BUILD_DEP: "1.13.3" | ||
py_3.7_32: | ||
PYTHON_VERSION: "3.7.x" | ||
PYTHON_ARCH: "x86" | ||
NP_BUILD_DEP: "1.14.5" | ||
NIGHTLY_BUILD: "true" | ||
py_3.7_64: | ||
PYTHON_VERSION: "3.7.x" | ||
NP_BUILD_DEP: "1.14.5" | ||
NIGHTLY_BUILD: "true" | ||
py_3.8_32: | ||
PYTHON_VERSION: "3.8.x" | ||
PYTHON_ARCH: "x86" | ||
NP_BUILD_DEP: "1.17.3" | ||
NIGHTLY_BUILD: "true" | ||
py_3.8_64: | ||
PYTHON_VERSION: "3.8.x" | ||
NP_BUILD_DEP: "1.17.3" | ||
NIGHTLY_BUILD: "true" | ||
|
||
- template: azure/posix.yml | ||
parameters: | ||
name: linux | ||
vmImage: ubuntu-16.04 | ||
matrix: | ||
py_3.6_32: | ||
MB_PYTHON_VERSION: "3.6" | ||
PLAT: "i686" | ||
py_3.6_64: | ||
MB_PYTHON_VERSION: "3.6" | ||
py_3.7_32: | ||
MB_PYTHON_VERSION: "3.7" | ||
PLAT: "i686" | ||
NP_BUILD_DEP: "numpy==1.14.5" | ||
NIGHTLY_BUILD: "true" | ||
py_3.7_64: | ||
MB_PYTHON_VERSION: "3.7" | ||
NP_BUILD_DEP: "numpy==1.14.5" | ||
NIGHTLY_BUILD: "true" | ||
py_3.8_32: | ||
MB_PYTHON_VERSION: "3.8" | ||
PLAT: "i686" | ||
NP_BUILD_DEP: "numpy==1.17.3" | ||
NIGHTLY_BUILD: "true" | ||
py_3.8_64: | ||
MB_PYTHON_VERSION: "3.8" | ||
NP_BUILD_DEP: "numpy==1.17.3" | ||
NIGHTLY_BUILD: "true" | ||
|
||
- template: azure/posix.yml | ||
parameters: | ||
name: macOS | ||
vmImage: macOS-10.14 | ||
matrix: | ||
py_3.6_64: | ||
MB_PYTHON_VERSION: "3.6" | ||
NP_BUILD_DEP: "numpy==1.13.3" | ||
py_3.7_64: | ||
MB_PYTHON_VERSION: "3.7" | ||
NP_BUILD_DEP: "numpy==1.14.5" | ||
NIGHTLY_BUILD: "true" | ||
py_3.8_64: | ||
MB_PYTHON_VERSION: "3.8" | ||
NP_BUILD_DEP: "numpy==1.17.3" | ||
NIGHTLY_BUILD: "true" |
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,129 @@ | ||
parameters: | ||
name: "" | ||
vmImage: "" | ||
matrix: [] | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
variables: | ||
REPO_DIR: "pandas" | ||
BUILD_COMMIT: "v1.0.2" | ||
PLAT: "x86_64" | ||
NP_BUILD_DEP: "numpy==1.13.3" | ||
CYTHON_BUILD_DEP: "cython==0.29.13" | ||
NIGHTLY_BUILD_COMMIT: "master" | ||
NIGHTLY_BUILD: "false" | ||
TEST_DEPENDS: "pytest pytest-xdist hypothesis" | ||
JUNITXML: "test-data.xml" | ||
TEST_DIR: "tmp_for_test" | ||
strategy: | ||
matrix: | ||
${{ insert }}: ${{ parameters.matrix }} | ||
|
||
steps: | ||
- checkout: self | ||
submodules: true | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: $(MB_PYTHON_VERSION) | ||
displayName: Set python version | ||
|
||
- bash: | | ||
set -e | ||
|
||
SKIP_BUILD="false" | ||
if [ "$BUILD_REASON" == "Schedule" ]; then | ||
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT | ||
if [ "$NIGHTLY_BUILD" != "true" ]; then | ||
SKIP_BUILD="true" | ||
fi | ||
fi | ||
echo "Building pandas@$BUILD_COMMIT" | ||
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" | ||
echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" | ||
|
||
# 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 | ||
pip install virtualenv wheel | ||
BUILD_DEPENDS="$NP_BUILD_DEP $CYTHON_BUILD_DEP" | ||
|
||
source multibuild/common_utils.sh | ||
source multibuild/travis_steps.sh | ||
source extra_functions.sh | ||
|
||
# Setup build dependencies | ||
before_install | ||
|
||
clean_code $REPO_DIR $BUILD_COMMIT | ||
build_wheel $REPO_DIR $PLAT | ||
displayName: Build wheel | ||
condition: eq(variables['SKIP_BUILD'], 'false') | ||
|
||
- bash: | | ||
set -xe | ||
source multibuild/common_utils.sh | ||
source multibuild/travis_steps.sh | ||
source extra_functions.sh | ||
setup_test_venv | ||
install_run $PLAT | ||
teardown_test_venv | ||
displayName: Install wheel and test | ||
condition: eq(variables['SKIP_BUILD'], 'false') | ||
|
||
- bash: | | ||
echo "##vso[task.prependpath]$CONDA/bin" | ||
sudo chown -R $USER $CONDA | ||
displayName: Add conda to PATH | ||
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) | ||
|
||
- bash: conda install -q -y anaconda-client | ||
displayName: Install anaconda-client | ||
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) | ||
|
||
- bash: | | ||
set -e | ||
if [ "$BUILD_REASON" == "Schedule" ]; then | ||
ANACONDA_ORG="scipy-wheels-nightly" | ||
TOKEN="$PANDAS_NIGHTLY_UPLOAD_TOKEN" | ||
else | ||
ANACONDA_ORG="multibuild-wheels-staging" | ||
TOKEN="$PANDAS_STAGING_UPLOAD_TOKEN" | ||
fi | ||
if [ "$TOKEN" == "" ]; then | ||
echo "##[warning] Could not find anaconda.org upload token in secret variables" | ||
fi | ||
echo "##vso[task.setvariable variable=TOKEN]$TOKEN" | ||
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" | ||
displayName: Retrieve secret upload token | ||
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) | ||
env: | ||
# Secret variables need to mapped to env variables explicitly: | ||
PANDAS_NIGHTLY_UPLOAD_TOKEN: $(PANDAS_NIGHTLY_UPLOAD_TOKEN) | ||
PANDAS_STAGING_UPLOAD_TOKEN: $(PANDAS_STAGING_UPLOAD_TOKEN) | ||
|
||
- bash: | | ||
set -e | ||
# The --force option forces a replacement if the remote file already | ||
# exists. | ||
ls wheelhouse/*.whl | ||
anaconda -t $TOKEN upload --force -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'], '') |
Oops, something went wrong.
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.
I think can temporarily remove this block to have it run on a pull request