Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CI configuration to use tox and Azure Pipelines for everything #229

Merged
merged 86 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
28a32ed
test windows ci
pierreglaser Dec 19, 2019
b683b8b
MNT dont use coverage 5 (bug with sqlite)
pierreglaser Dec 19, 2019
6fa8769
CI trigger
pierreglaser Jan 13, 2020
d8da31c
MNT pin codecov when uploading results, comments
pierreglaser Jan 13, 2020
5619a82
FIX pin one last coverage install
pierreglaser Jan 13, 2020
ae1de32
fix weird command misinterpretation
pierreglaser Jan 13, 2020
3ad4ae0
FIX dont use sqlite with coverage
pierreglaser Jan 13, 2020
3490ba5
try with set
pierreglaser Jan 13, 2020
65b5378
try to use the old json legacy format storing
pierreglaser Jan 13, 2020
59b35e8
FIX try activating the testenv during upload
pierreglaser Jan 14, 2020
df95363
FIX try adding conda init bash
pierreglaser Jan 14, 2020
fbcd455
move back to batch upload script
pierreglaser Jan 14, 2020
3ccde6f
increase upload_codecov.[sh, cmd] verbosity
pierreglaser Jan 14, 2020
f550912
MNT revert unnecessary changes
pierreglaser Jan 14, 2020
bb30247
FIX remove stale comments
pierreglaser Jan 14, 2020
453955d
CI test which plaform is used on Window's bash
pierreglaser Jan 14, 2020
57ace6d
FIX add conda to path before
pierreglaser Jan 14, 2020
0111ae7
FIX remove spurious duplicate
pierreglaser Jan 14, 2020
2f1fde9
CI use tox inside Windows CI
pierreglaser Jan 17, 2020
ebec69f
FIX use bash entries instead of script
pierreglaser Jan 17, 2020
a7e1279
FIX dont isolate tox from test environment (temp)
pierreglaser Jan 17, 2020
dae070c
FIX use tox.env python version for tox
pierreglaser Jan 17, 2020
5fc524c
FIX pass the skip-high-memory flag
pierreglaser Jan 17, 2020
94cff19
CI use recommended way to upload to codecov
pierreglaser Jan 17, 2020
4fefd13
FIX dont rely on OS-specific bash syntax
pierreglaser Jan 17, 2020
0f27385
run only a few tests to speed up debugging
pierreglaser Jan 17, 2020
edcb81f
FIX use bash directive directly
pierreglaser Jan 17, 2020
6ad76ef
FIX try naive coverage installation
pierreglaser Jan 17, 2020
82e3bba
FIX try smarter way to note re-install coverage
pierreglaser Jan 17, 2020
ad07eb4
FIX typo in py35 env
pierreglaser Jan 17, 2020
20ffcc6
MNT prepare linux integration into azure-pipelines
pierreglaser Jan 17, 2020
959b154
FIX pass correctly the imageName
pierreglaser Jan 17, 2020
c5126fa
CI integrate linux into azure pipelines
pierreglaser Jan 17, 2020
abf2f25
FIX spurious LOKY_MAX_DEPTH add
pierreglaser Jan 17, 2020
9591af8
CLN remove outdated bash/cmd CI files
pierreglaser Jan 17, 2020
6ac8c1e
CLN remove other outdated scripts
pierreglaser Jan 17, 2020
61d96ae
CI add macos to azure-pipelines
pierreglaser Jan 17, 2020
f37e169
CI add pypy to azure-pipelines CI
pierreglaser Jan 17, 2020
df1fd90
FIX typo
pierreglaser Jan 17, 2020
35bfefa
CLN remove pypy from travis
pierreglaser Jan 17, 2020
2fb3daf
CI unify the test command to migrate fully to azure
pierreglaser Jan 17, 2020
e1523ab
FIX travis leftovers
pierreglaser Jan 17, 2020
a8ebb14
WIP debug
pierreglaser Jan 17, 2020
fc06a0a
FIX use tox_env env var
pierreglaser Jan 17, 2020
4ae0677
FIX dont test docker-related issues on windows
pierreglaser Jan 17, 2020
fe2d784
CLN remove .travis.yml (!!!!)
pierreglaser Jan 17, 2020
2643829
CI add final matrix entries (testing joblib etc.)
pierreglaser Jan 17, 2020
da67b85
FIX change style of matrix entries variable
pierreglaser Jan 17, 2020
fb60831
revert style changing, add missing python.version
pierreglaser Jan 17, 2020
96cd03e
FIX EOD silly mistakes
pierreglaser Jan 17, 2020
3d3cc69
WIP debug
pierreglaser Jan 17, 2020
a4c8a53
Fix use correct predefined env vars
pierreglaser Jan 17, 2020
870a413
FIX fix
pierreglaser Jan 17, 2020
af2a322
FIX use correct environment variable
pierreglaser Jan 17, 2020
44d8577
FIX install pytest
pierreglaser Jan 17, 2020
e59f465
add threadpoolctl
pierreglaser Jan 17, 2020
d57bc77
Merge branch 'master' into test-windows-ci-error
pierreglaser Jan 17, 2020
4e9bb69
correctly pass PYTEST_ARGS
pierreglaser Jan 17, 2020
0dfdbc8
CLN env var cleanups
pierreglaser Jan 20, 2020
dd85324
CLN style, unused variables, revert useless changes.
pierreglaser Jan 20, 2020
a0ec4d3
FIX wrong quote enclosing
pierreglaser Jan 20, 2020
2974613
CI run the joblib test suite inside a venv
pierreglaser Jan 20, 2020
5a52079
FIX typos, leftover debug code
pierreglaser Jan 20, 2020
e4c8252
CLN collapse template into .azure-pipelines.yml
pierreglaser Jan 20, 2020
db0e5ab
FIX add matrix in strategy entry
pierreglaser Jan 20, 2020
85c4423
FIX matrix outside of parameters
pierreglaser Jan 20, 2020
2b1980b
FIX, CLN remove completely parameters entry
pierreglaser Jan 20, 2020
c525f5e
FIX correct job name
pierreglaser Jan 20, 2020
8656b49
CI run the actual steps of the CI
pierreglaser Jan 20, 2020
559f7c7
Do not install numpy for the PyPy tests
ogrisel Jan 20, 2020
ec787bc
Run Python 3.8 and reorg order
ogrisel Jan 21, 2020
4ba3527
Cleanup
ogrisel Jan 21, 2020
36ae876
Update tox.ini: py38 / passenv / remove basepython
ogrisel Jan 21, 2020
f956a0b
Move some env vars defs into tox.ini
ogrisel Jan 21, 2020
fc1a7cc
Update badge
ogrisel Jan 21, 2020
605f3c0
Small fixes
ogrisel Jan 21, 2020
1f3cb7a
Try to generate language independent coverage report
ogrisel Jan 21, 2020
0edcae7
Do not prefetch docker image when not necessary
ogrisel Jan 21, 2020
ceaef5e
Comment out failing loky test on python 3.8 for now
ogrisel Jan 21, 2020
f6f3d1e
Display number of detected CPUs
ogrisel Jan 21, 2020
0d0a439
CI trigger
pierreglaser Jan 21, 2020
486ccb3
explicitly pass filename to prevent discovering errors
pierreglaser Jan 21, 2020
3ebc9a9
Override git bash used in windows
pierreglaser Jan 21, 2020
09874f5
fix
pierreglaser Jan 21, 2020
efd9cd8
try another syntax
pierreglaser Jan 21, 2020
f27fe6e
CI trigger
pierreglaser Jan 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 94 additions & 75 deletions .azure_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,100 @@
# Adapted from https://github.com/pandas-dev/pandas/blob/master/azure-pipelines.yml
jobs:

- template: continuous_integration/azure/windows.yml
parameters:
name: Windows
vmImage: vs2017-win2016
- job: 'test_loky'
strategy:
matrix:
py37_conda:
VERSION_PYTHON: '3.7'
PACKAGER: 'conda'
py36_pip:
VERSION_PYTHON: '3.6'
PACKAGER: 'pip'
py35_conda:
VERSION_PYTHON: '3.5'
PACKAGER: 'conda'
py27_pip:
VERSION_PYTHON: '2.7'
PACKAGER: 'pip'

# windows-py38:
# imageName: "vs2017-win2016"
# python.version: "3.8"
# tox.env: py38
windows-py35:
imageName: "vs2017-win2016"
python.version: "3.5"
tox.env: py35
windows-py27:
imageName: "vs2017-win2016"
python.version: "2.7"
tox.env: py27

# macos-py38:
# imageName: "macos-10.13"
# python.version: "3.8"
# tox.env: py38
macos-py35:
imageName: "macos-10.13"
python.version: "3.5"
tox.env: py35
macos-py27-high-memory:
imageName: "macos-10.13"
python.version: "2.7"
tox.env: py27
RUN_MEMORY: "true"

linux-pypy3:
imageName: "ubuntu-16.04"
python.version: "pypy3"
tox.env: pypy3
LOKY_MAX_CPU_COUNT: "2"

linux-py38-joblib-tests:
imageName: "ubuntu-16.04"
python.version: "3.8"
tox.env: "py38"
JOBLIB_TESTS: "true"
# linux-py38-high-memory:
# imageName: "ubuntu-16.04"
# python.version: "3.8"
# tox.env: py38
# RUN_MEMORY: "true"
linux-py37:
imageName: "ubuntu-16.04"
python.version: "3.7"
tox.env: py37
linux-py36:
imageName: "ubuntu-16.04"
python.version: "3.6"
tox.env: py36
linux-py35:
imageName: "ubuntu-16.04"
python.version: "3.5"
tox.env: py35
linux-py27:
imageName: "ubuntu-16.04"
python.version: "2.7"
tox.env: py27

pool:
vmImage: $(imageName)
variables:
JUNITXML: 'test-data.xml'
PYTEST_ARGS: '-vl --timeout=60 --maxfail=5'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity please move the variables section to the top of the job declaration.

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
# azure-pipelines unpredictably switches between Git\bin\bash and
# Git\usr\bin\bash when running a bash script inside Windows environments.
# The latter may use wrong bash commands, resulting in errors when codecov
# tries to upload the coverage results.
- bash: echo "##vso[task.prependpath]C:/Program Files/Git/bin"
displayName: 'Override Git bash shell for Windows'
condition: eq(variables['Agent.OS'], 'Windows_NT')

- script: python -m pip install --upgrade tox
displayName: 'Install tox'

- script: |
bash continuous_integration/runtests.sh
displayName: 'Test loky'

# - template: build_tools/azure/posix.yml
# parameters:
# name: Linux
# vmImage: ubuntu-16.04
# matrix:
# # Linux environment to test that scikit-learn can be built against
# # versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04
# # i.e. numpy 1.11 and scipy 0.17
# py35_np_atlas:
# DISTRIB: 'ubuntu'
# PYTHON_VERSION: '3.5'
# SKLEARN_SITE_JOBLIB: '1'
# JOBLIB_VERSION: '0.11'
# # Linux + Python 3.5 build with OpenBLAS and without SITE_JOBLIB
# py35_conda_openblas:
# DISTRIB: 'conda'
# PYTHON_VERSION: '3.5'
# INSTALL_MKL: 'false'
# NUMPY_VERSION: '1.11.0'
# SCIPY_VERSION: '0.17.0'
# CYTHON_VERSION: '*'
# PILLOW_VERSION: '4.0.0'
# COVERAGE: 'true'
# # Linux environment to test the latest available dependencies and MKL.
# # It runs tests requiring pandas and PyAMG.
# # It also runs with the site joblib instead of the vendored copy of joblib.
# pylatest_conda:
# DISTRIB: 'conda'
# PYTHON_VERSION: '*'
# INSTALL_MKL: 'true'
# NUMPY_VERSION: '*'
# SCIPY_VERSION: '*'
# PANDAS_VERSION: '*'
# CYTHON_VERSION: '*'
# PYAMG_VERSION: '*'
# PILLOW_VERSION: '*'
# JOBLIB_VERSION: '*'
# COVERAGE: 'true'
# CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
# TEST_DOCSTRINGS: 'true'
# SKLEARN_SITE_JOBLIB: '1'
# CHECK_WARNINGS: 'true'
- task: PublishTestResults@2
inputs:
testResultsFiles: '$(JUNITXML)'
displayName: 'Publish Test Results'
condition: succeededOrFailed()

# - template: build_tools/azure/posix.yml
# parameters:
# name: macOS
# vmImage: xcode9-macos10.13
# matrix:
# pylatest_conda:
# DISTRIB: 'conda'
# PYTHON_VERSION: '*'
# INSTALL_MKL: 'true'
# NUMPY_VERSION: '*'
# SCIPY_VERSION: '*'
# CYTHON_VERSION: '*'
# PILLOW_VERSION: '*'
# JOBLIB_VERSION: '*'
# COVERAGE: 'true'
- bash: |
curl -s https://codecov.io/bash | bash
displayName: 'Upload to codecov'
condition: succeeded()
60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ This work is supported by the Center for Data Science, funded by the
IDEX Paris-Saclay, ANR-11-IDEX-0003-02


.. |Build Status| image:: https://travis-ci.org/tomMoral/loky.svg?branch=master
:target: https://travis-ci.org/tomMoral/loky
.. |Build status| image:: https://ci.appveyor.com/api/projects/status/oifqilb5sb0p7fdp/branch/master?svg=true
:target: https://ci.appveyor.com/project/tomMoral/loky/branch/master
.. |azurepipelines| image:: https://dev.azure.com/joblib/loky/_apis/build/status/joblib.loky?branchName=master
:target: https://dev.azure.com/joblib/loky/_build?definitionId=2&_a=summary&repositoryFilter=2&branchFilter=38
.. |codecov| image:: https://codecov.io/gh/tomMoral/loky/branch/master/graph/badge.svg
:target: https://codecov.io/gh/tomMoral/loky

Expand Down
33 changes: 0 additions & 33 deletions continuous_integration/azure/install.cmd

This file was deleted.

7 changes: 0 additions & 7 deletions continuous_integration/azure/test_script.cmd

This file was deleted.

8 changes: 0 additions & 8 deletions continuous_integration/azure/upload_codecov.sh

This file was deleted.

38 changes: 0 additions & 38 deletions continuous_integration/azure/windows.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
#!/usr/bin/env sh
# This script is meant to be called by the "script" step defined in
# .travis.yml. See http://docs.travis-ci.com/ for more details.

# License: 3-clause BSD

set -e
which $PYTHON
$PYTHON --version
echo $TOXENV

# Make sure that we have the python docker image cached locally to avoid
# a timeout in a test that needs it.

if [ "$(which docker)" != "" ]; then
docker pull python:3.6
fi
which python
python --version
echo ${TOX_ENV}

if [ "$JOBLIB_TESTS" = "true" ]; then
# Install joblib from pip, patch it to use this version of loky
# and run the joblib tests with pytest.
python -m venv venv/
source ./venv/bin/activate
which python
git clone https://github.com/joblib/joblib.git src_joblib
cd src_joblib
pip install pytest
pip install threadpoolctl # required by some joblib tests

pip install -e .
export JOBLIB=`python -c "import joblib; print(joblib.__path__[0])"`
cp $TRAVIS_BUILD_DIR/continuous_integration/travis/copy_loky.sh $JOBLIB/externals
(cd $JOBLIB/externals && bash copy_loky.sh $TRAVIS_BUILD_DIR)
cp "$BUILD_SOURCESDIRECTORY"/continuous_integration/copy_loky.sh $JOBLIB/externals
(cd $JOBLIB/externals && bash copy_loky.sh "$BUILD_SOURCESDIRECTORY")
pytest -vl --ignore $JOBLIB/externals --pyargs joblib
else
# Make sure that we have the python docker image cached locally to avoid
# a timeout in a test that needs it.
if [ "$(which docker)" != "" ] && [ "$(uname)" = "Linux" ]; then
docker pull python:3.6
fi

# Run the tests and collect trace coverage data both in the subprocesses
# and its subprocesses.
PYTEST_ARGS="-vl --timeout=60 --maxfail=5"
if [ "$RUN_MEMORY" != "true" ]; then
PYTEST_ARGS="$PYTEST_ARGS --skip-high-memory"
fi
COVERAGE_PROCESS_START="$TRAVIS_BUILD_DIR/.coveragerc" $PYTHON -m tox -- $PYTEST_ARGS
tox -v -e "${TOX_ENV}" -- ${PYTEST_ARGS} --junitxml="${JUNITXML}"
fi
Loading